Jupyter Error: "No Module Named Jupyter_Core. Paths"
Trying to Open Jupyter Notebook (Osx 10.11.4) I Get the Following Error: $ Jupyter-Notebook Traceback (Most Recent Call Last): File...
Trying to open Jupyter Notebook (OSX 10.11.4) I get the following error:
$ jupyter-notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/Users/geotheory/Library/Python/2.7/lib/python/site-packages/notebook/__init__.py", line 25, in <module>
from .nbextensions import install_nbextension
File "/Users/geotheory/Library/Python/2.7/lib/python/site-packages/notebook/nbextensions.py", line 23, in <module>
from jupyter_core.paths import jupyter_data_dir, jupyter_path, SYSTEM_JUPYTER_PATH
ImportError: No module named jupyter_core.paths
This used to work. Any idea how to diagnose?
12 Answers
I had the same issue, fixed by simply using pip install jupyter in the macOS or Ubuntu terminal.
I faced the same issue, and was able resolve with the following steps.
conda create -n py36 python=3.6
conda activate py36
conda install notebook ipykernel jupyterlab
I have encountered similar issue. Basically, I solved it by uninstall python2.7 and re-install newer python & IPython versions.
Details on how to effectively uninstall python2.7 via Mac OS command line is here: How to uninstall Python 2.7 on a Mac OS X 10.6.4?
Re-install desired version of IPython via command line. In my case, I also needed to re-install Jupyter via:
$ pip install jupyter
Good luck.
If you are using Anaconda, I recommend installing Jupyter to your conda environment using the following:
conda install -c anaconda jupyter
You can then launch Jupyter from the terminal with the following command:
jupyter notebook .
I solved this issue in my environment by uninstalling and then reinstalling jupyter notebook. After that, worked like a charm. While your environment is active, run:
pip uninstall jupyter notebook
pip install jupyter notebook
This post (using conda-forge, as recommends without showing how)
Basically it's:
conda create -n jupyter
conda activate jupyter
conda config --add channels conda-forge
conda config --set channel_priority strict
The following is the key (-c conda-forge)
conda install -c conda-forge notebook
conda install -c conda-forge nb_conda_kernels
conda install -c conda-forge jupyterlab
conda install -c conda-forge nb_conda_kernels
I met with the similar problem this morning. As I changed the $PYTHONPATH directory in bash_profile. Then I solved by re-specify the python path back to /usr/lib/python2.*. I hope it will help.
In my case this was because pip, run with sudo, did not set read and execute rights on the files and directories it created under /usr/local/lib/python2.7/dist-packages.
So I used find and chmod to set them, as described there :
cd /usr/local/lib/python2.7/dist-packages
sudo find ./ -type d -exec chmod a+rx {} \;
sudo find ./ -type f -exec chmod a+r {} \;
In fact, this behaviour of sudo probably arises from the fact that my standard user umask is 0007 (creating private files by default). This seems to transfer to sudo. To avoid this, one can edit the sudo configuration by running sudo visudo and adding the following lines, as per this answer :
Defaults umask_override
Defaults umask=0022
(although quite late to the party but) You mentioned that 'it used to work' and from your prompt it looks like you're not in your 'virtual environment'. Simply activate your proper virtual environment to have it work like before.
just using pip install jupyter while my environment was active worked for me
Spoiler: not the cleanest solution but just a workaround.
I had the same issue on Linux (Fedora) caused by the launcher in ~/.local/bin/jupyter due to different versions installed globally and from conda. So I jusst used this workaround (from terminal with conda env) wich worked fine in my case:
python3 -m jupyter notebook
It happens when you have multiple versions of Python in your system. Try to find the correct version by looking in the 'pip' directory:
which pip
For me, it was located in:
~/bulk/Python/python-3.7.4/bin/
There, you should be able to find the jupyter executable:
$ ls jupyter
jupyter
Try to run it directly by:
./jupyter
Hope this helps.