0

I installed a copy of Anaconda to play around with, but decided I liked Homebrew better, so I removed it. However, this seems to have messed up my install of Jupyter Notebooks, as I can no longer access it. I reinstalled it with pip install jupyter and when I run pip show jupyter I get:

Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: [email protected]
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: ipywidgets, nbconvert, notebook, jupyter-console, qtconsole, ipykernel

But when I run which -a jupyter I get nothing. I even tried uninstalling and installing python again via Homebrew and it still gives me the error, -bash: jupyter: command not found.

I have python installed correctly, which -a python gives:

/usr/local/bin/python
/usr/bin/python

Any ideas as to why it might not be working?

2
  • Homebrew and Anaconda have very different purposes Commented Apr 25, 2017 at 0:52
  • It's possible pip installed the binary somewhere else. What does find / -name jupyter return? Commented Apr 25, 2017 at 1:15

4 Answers 4

9

I'm on Mac and am using Zsh. For some reason, after I installed Python3, the following line:

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"

was added to .zprofile instead of .zshrc.

I transferred the line to .zshrc and did source ~/.zshrc. That did the trick.

Sign up to request clarification or add additional context in comments.

Comments

4

The below command seems to install only python files (under /usr/local/lib/python2.7/site-packages in your case):

pip install jupyter

You can run the jupyter as a Python's module like this:

python -m jupyter

To see all installed modules you can type the following command from the Python's shell:

help('modules')

As an alternative you can try to upgrade the package:

pip install --upgrade pip
pip install --upgrade jupyter

If you want to access the jupyter by simply typing jupyter in your shell then the path to the jupyter's binary file should be placed inside the PATH variable.

During the installation of Anaconda software the jupyter binary is placed under /usr/local/bin/jupyter (Ubuntu 14.04).

Comments

2

On Mac OS Mojave,

pip3 install jupyter

installs jupyter under

/Library/Frameworks/Python.framework/Versions/3.5/bin/

. Your version may be different from 3.5. You can then link to the binary there as follows.

ln -s /Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter /usr/local/bin/

In the rare case that /usr/local/bin/ is not on your PATH, you may replace it above with some folder that is.

1 Comment

Thanks for sharing. This should be the accepted answer!
2
python -m notebook

should do the trick

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.