I created a virtual environment and installed ipython[all]
and jupyter
with pip. When I run jupyter lab
, open a notebook, and try importing a package I installed inside the virtual environment, I get “ModuleNotFoundError.”
Running ipython
in the console and importing works. Also, which jupyter
does point me to the right executable in the virtual environment.
In addition to installing jupyter
, I need to install jupyter lab
. Otherwise, even the virtual environment jupyter
executable actually silently falls back to the system Jupyter Lab installation.
来源:https://stackoverflow.com/questions/52799158/jupyter-lab-is-not-using-virtual-environment