I recently deleted and reinstalled /opt/anaconda3 on my mac (running macOS Monterey, v.12.7.2.)
When I run "jupyter server --generate-config" I get:
Traceback (most recent call last): File "/usr/local/Cellar/jupyterlab/4.1.6_1/libexec/bin/jupyter-server", line 5, in from jupyter_server.serverapp import main File "/opt/anaconda3/lib/python3.11/site-packages/jupyter_server/serverapp.py", line 30, in import jupyter_client File "/opt/anaconda3/lib/python3.11/site-packages/jupyter_client/init.py", line 3, in from .asynchronous import AsyncKernelClient File "/opt/anaconda3/lib/python3.11/site-packages/jupyter_client/asynchronous/init.py", line 1, in from .client import AsyncKernelClient # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.11/site-packages/jupyter_client/asynchronous/client.py", line 8, in import zmq.asyncio File "/opt/anaconda3/lib/python3.11/site-packages/zmq/init.py", line 103, in from zmq import backend File "/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/init.py", line 31, in raise original_error from None File "/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/init.py", line 26, in _ns = select_backend(first) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/select.py", line 31, in select_backend mod = import_module(name) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/cython/init.py", line 6, in from . import ( ImportError: cannot import name '_device' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/cython/init.py)
Please help,
Jonathan
I haven't tried any additional steps, because I don't know what to try.
"/usr/local/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.pyand"/opt/anaconda3/lib/python3.11/site-packages/zmq/backend/cython/init.py",You've messed up your install by mixing and matching installation methods it seems. It should all be Anaconda it is referencing because you seem to have installed the Anaconda Distribution and thus opted at that time to make that your primary package distribution system and you should stick with only using Anaconda/conda for installations. Unless there's no conda recipe, and ...pip. Keeping in mind the environments then won't be robust and portable. (Plus I see/usr/local/Cellar/jupyterlab/4.1.6_1/libexec/bin/jupyter-server. Yikes. Severely messed up considering everything should be using Anaconda.) So it looks like you need to clean up that other stuff, if indeed you know you installed it. (This might help.) Then you may still need to uninstall and reinstall Anaconda to fully register everything is linked to that. Obviously, ...Cellaris? Is that an app? Yours looks different than where I referred you. Are you using the Anaconda navigator to launch things and running thatjupyter server --generate-configin there? If not, you should be doing that and maye things aren't as messed up as it looks form that traceback.