I am running the following command:
conda create -n jupyterlab-ext --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab=3 cookiecutter nodejs jupyter-packaging
The above command is part of the Jupyter labextension tutorial and I have run this command (followed by jlpm
described below) successfully every day for several days.
However today, after running the above conda create
, and then activating the environment, when I try to run the jupyter-packaging program jlpm
then I get the following:
~/code$ conda activate myenv
(myenv) ~/code$ jlpm
Segmentation fault: 11
This is happening consistently today on my MacBook. It worked fine yesterday, and the day before. (It is also working fine even today in my WLS2 environment on my PC).
I suspect that conda
is installing a bad version of jupyter-packaging
, or more likely, a bad version of something that jupyter-packaging
depends upon. I tried rebooting my mac, same issue.
Any ideas?
running miniconda:
~/code$ conda --version
conda 23.1.0
Some additional information:
It is not actually
jlpm
that is crashing, butjupyter
itself.running
jupyter
with no args, or with no subcommand, works fine. For example:jupyter <enter> jupyter --help <enter> jupyter --version <enter> # all of these work fine.
running
jupyter
with any subcommand, givesSegmentation fault: 11
, for example:jupyter labextension --list <enter> jupyter lab <enter> jupyter notebook <enter> # All of these Segmentation fault: 11
The Seg fault is always while importing main for the subcommand, for example:
- "jupyter notebook " crashes on:
from notebook.notebookapp import main
- "jupyter labextension --list " crashes on:
from jupyterlab.labextensions import main
- "jupyter notebook " crashes on:
There definitely seems to be something wrong with the conda version of jupyterlab. If I run the
conda create
command that I listed at the top of this question, except I leave outjupyterlab=3
so that jupyterlab is not installed, *and then after activating the environment I use **pip install jupyterlab
then everything works fine!If I had another macbook, I would test if this is an issue with all macs, or just mine. As mentioned above, I don't have this problem on WSL2 ubuntu.
pdb seemed to indicate that the crash was in
lib/python3.11/importlib/_bootstrap.py
but that does not mean that the problem isn't with the jupyter package (from conda) only that (as I mentioned above) the crash occurs while importing main from the specified subcommand.