Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter notebook command does not work on Mac

I installed jupyter using pip on my macbook air. Upon trying to execute the command jupyter notebook, I get an error

jupyter: 'notebook' is not a Jupyter command 

I used the --h option to get a listing of all jupyter commands and indeed, 'notebook' is not one of the commands. I am running python 2.7 and it was already installed before I installed jupyter.

I searched on google and I see a similar problem some people have faced with the latest version of jupyter but I don't see any solutions. Can somebody point me in the right direction?

which -a pip: /usr/local/bin/pip

which -a jupyter: /usr/local/bin/jupyter

like image 595
pokiman Avatar asked Jan 27 '16 04:01

pokiman


People also ask

Does Jupyter Notebook work on Mac?

In this article, we will learn how to install Jupyter Notebook in Python on MacOS. The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.

Why can't I open Jupyter Notebook from command line?

Jupyter fails to start If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command jupyter notebook . If it can't find jupyter , you may need to configure your PATH environment variable.

How do I enable command mode in Jupyter Notebook?

Enter command mode by pressing Esc or using the mouse to click outside a cell's editor area.


2 Answers

I had the same problem. After looking to a gazillion of pages on line and trying as many solutions, this is the only thing that worked for me:

pip uninstall notebook pip install --upgrade notebook 

I am not sure that the "upgrade" is necessary, but after that I had

jupyter-notebook 

and

jupyter notebook 

as commands.

like image 95
mic Avatar answered Sep 27 '22 20:09

mic


I got the same error as you when which jupyter is /usr/local/bin/jupyter. I managed to solve the case by updating/upgrading all my ipython packages

sudo -H pip install --upgrade "ipython[all]" 

I managed to solve the case in OS X El-Capitan 10.11.5 and Ubuntu Linux 16.04. My Jupyter version after the upgrade is 4.1.0. My Python is 2.7.11+. My Pip version is 8.1.2.

like image 37
Léo Léopold Hertz 준영 Avatar answered Sep 27 '22 20:09

Léo Léopold Hertz 준영