0

I'm trying to run Jupyter notebook on Mac OS Catalina. I followed the basic instructions:

pip3 install jupyter

I tried everything that is mentioned in the other answers here on stack overflow. I have edited the .bash_profile file, and I have tried to start the notebook with

~/local/bin/jupyter

But nothing is working. My .bash_profile looks like this:

export PATH="/usr/local/mysql/bin:/usr/local/bin:/usr/local/git/bin:$PATH"
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH

How can I run Jupyter Notebook on Mac OS Catalina?

Kokodoko
  • 26,167
  • 33
  • 120
  • 197
  • Any interest in using [Anaconda]( https://www.anaconda.com/distribution/)? It ships with Jupyter as well as lots of other goodies. Also, when I run Jupyter locally, 'jupyter notebook --browser any` launches it & gives you the local url to run it in any browser. – stever Jan 31 '20 at 16:36
  • Sounds convenient! But how do I find and uninstall all the previous versions of python from my machine? They seem to be sprinkled all over the place in many different folders. – Kokodoko Feb 01 '20 at 11:30
  • Hmm. I've gotten used to multiple python versions. It feels dirty but they don't seem to interfere with each other. – stever Feb 01 '20 at 17:29

1 Answers1

2

I have encountered the similar annoying problem and here is my one-line solution:

  • Open terminal and type:

    brew install jupyter
    
  • If you haven't install brew on your Mac, please follow the instruction here: https://brew.sh/

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    
  • Wait for around 10 minutes until the installation finishes and try jupyter again.


Explain:

It helps download a lot of "Catalina" related packages, like

==> Downloading https://homebrew.bintray.com/bottles/jupyterlab-2.1.5.catalina.bottle.tar.gz
......
==> Downloading https://homebrew.bintray.com/bottles/ipython-7.16.1.catalina.bottle.tar.gz
......

See https://github.com/dotnet/interactive/issues/34 for the latest discussions on this issue.


From the comments:

Try opening Visual Studio Code and installing Jupyter extensions there if the above method does not work.

Luke
  • 41
  • 6
  • Thanks! But after doing all this, it still didn't work...but now VS Code (my editor) started to ask if I want to install Jupyter (even though I did that three times already) and now it works. It remains a huge mystery why there are so many different install paths for python and all the python tools. – Kokodoko Jul 13 '20 at 14:04
  • Good to know that you somehow worked it out at last! I guess it might because some essential part of the Jupyter was installed in your PC by this powerful "homebrew" tool; Then VS Code can handle the things left, like setting the PATH or linking the libraries etc. – Luke Jul 14 '20 at 06:15
  • The answer to so many install paths for Python and its tools ... is another big problem. In my opinion, multiple Python versions and the efforts put in making it "user-friendly" -- even to ones without CS or SE background -- through tools favored by various communities, could be two of the reasons. You may see these questions for details: [pip vs. conda](https://stackoverflow.com/questions/20994716/what-is-the-difference-between-pip-and-conda/21008900), [juypter, ipython, and path](https://stackoverflow.com/questions/39007571/running-jupyter-with-multiple-python-and-ipython-paths/39022003). – Luke Jul 14 '20 at 06:21
  • Yeah it drives me nuts, for example, I always get this error: `please run pip --upgrade`, but when I do that I get `unknown command: pip`... it's maddening! I don't even want `pip` because python3 uses `pip3`.... – Kokodoko Jul 14 '20 at 10:55
  • 1
    Try `python3 -m pip install --upgrade pip`. ;) – Luke Jul 14 '20 at 12:17