Jupyter notebook not running from newly made Conda environment

(MNIST) tobennaudeze@BUDs-Mac ~ % jupyter notebook
Traceback (most recent call last):
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/bin/jupyter-notebook”, line 5, in
from notebook.app import main
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/notebook/app.py”, line 20, in
from jupyterlab.commands import ( # type:ignore[import-untyped]
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab/init.py”, line 8, in
from .handlers.announcements import (
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab/handlers/announcements.py”, line 15, in
from jupyterlab_server.translation_utils import translator
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab_server/init.py”, line 6, in
from .app import LabServerApp
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab_server/app.py”, line 15, in
from .handlers import LabConfig, add_handlers
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab_server/handlers.py”, line 21, in
from .listings_handler import ListingsHandler, fetch_listings
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/jupyterlab_server/listings_handler.py”, line 10, in
import requests
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/requests/init.py”, line 48, in
from charset_normalizer import version as charset_normalizer_version
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/charset_normalizer/init.py”, line 23, in
from charset_normalizer.api import from_fp, from_path, from_bytes, normalize
File “/Users/tobennaudeze/opt/anaconda3/envs/MNIST/lib/python3.11/site-packages/charset_normalizer/api.py”, line 10, in
from charset_normalizer.md import mess_ratio
AttributeError: partially initialized module ‘charset_normalizer’ has no attribute ‘md__mypyc’ (most likely due to a circular import)

I get this error when I run the jupyter notebook server from a newly made environment. How can I resolve this?

Do you mean it works when you use the base environment?

Did you follow all the steps to set up Jupyter in a new environment? There’s like three commands needed and it is easier if you are using nb_conda_kernels.

1 Like

yeah it works in the base environment
I didn’t know about the steps to use jupyter in a new environment, is there a link I can use?

See here.

The highest scoring one there goes into more details and includes what I was thinking of, but maybe the first specific link is enough to help you?

1 Like