Hi,
I must be doing something wrong, but I cannot figure out what it is.
No matter what I do, I get the following error after these steps:
jupyter lab from the command lineTraceback (most recent call last):
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyterlab_server/server.py", line 20, in <module>
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 78, in <module>
from .services.kernels.kernelmanager import MappingKernelManager
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 19, in <module>
from jupyter_client.session import Session
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 35, in <module>
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name 'secure_write' from 'jupyter_core.paths' (/Users/nicholasmi/.local/lib/python3.7/site-packages/jupyter_core/paths.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nicholasmi/anaconda3/bin/jupyter-lab", line 6, in <module>
from jupyterlab.labapp import main
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyterlab/labapp.py", line 14, in <module>
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyterlab_server/__init__.py", line 4, in <module>
from .app import LabServerApp
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyterlab_server/app.py", line 9, in <module>
from .server import ServerApp
File "/Users/nicholasmi/anaconda3/lib/python3.7/site-packages/jupyterlab_server/server.py", line 26, in <module>
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
Here are the jupyter packages that are installed by anaconda:
jupyter 1.0.0 py37_7
jupyter_client 5.3.4 py37_0
jupyter_console 6.1.0 py_0
jupyter_core 4.6.1 py37_0
jupyterlab 1.2.6 pyhf63ae98_0
jupyterlab_server 1.0.6 py_0
I have tried everything up to and including a full removal of anaconda using anaconda-clean, rm -rf of the ~/anaconda3 and ~/Library/Jupyter directories, and a full restart of my machine afterwards.
How can I get a working environment?
resolved:
rm -rf ~/.local
What did you do? Please tell.
The secure_write issue is due to a newer version of jupyter_client running with an older version of jupyter_core since secure_write was moved from client to core. Updating jupyter_core should get you going, although I would recommend performing the upgrade via jupyter_client - which will also update core - since there have been a number of changes since May.
Regarding the jupyter_server issue, this is odd in that lab didn't reference jupyter_server until recently (it's 3.0 release will rely on it). However, I suspect there was a period where such a reference did exist. If you're still using that version of lab, you should be able to resolve that missing module issue via pip install jupyter_server.
C:\Users\Jothinath>jupyter-lab
Traceback (most recent call last):
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\jupyterlab_server\server.py", line 20, in
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\notebook\notebookapp.py", line 51, in
from zmq.eventloop import ioloop
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\zmq__init__.py", line 50, in
_load_libzmq()
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\zmq__init__.py", line 28, in _load_libzmq
from . import libzmq
ImportError: DLL load failed while importing libzmq: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Jothinath\AppData\Local\Programs\Python\Python39-32\Scripts\jupyter-lab.exe__main__.py", line 4, in
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\jupyterlab\labapp.py", line 14, in
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\jupyterlab_server__init__.py", line 4, in
from .app import LabServerApp
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\jupyterlab_serverapp.py", line 9, in
from .server import ServerApp
File "c:\users\jothinathappdata\local\programs\python\python39-32\lib\site-packages\jupyterlab_server\server.py", line 26, in
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
Please open this issue in jupyter-lab. It seems as though you're picking a pre-release (that depends on jupyter_server rather than notebook) somehow.