Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyter notebook bad interpreter error message

I tried to use jupyter notebook with kernel python3, but I got this error message.

anonymous$ jupyter notebook
/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

Information about python and pip installed on mac (i used pip3 to install jupyter ):

anonymous$ which -a python python2 python2.7 python3 python3.6
/usr/bin/python
/usr/bin/python2.7
/usr/local/bin/python3
/usr/local/bin/python3.6
anonymous$ which -a pip pip2 pip3
/usr/local/bin/pip
/usr/local/bin/pip3

Tried to solve it with "brew update && brew upgrade jupyter" as the other post suggested but did not work. Got an error message saying that "Error: jupyter not installed".

like image 936
Anonny Avatar asked Apr 20 '18 16:04

Anonny


People also ask

Why is my Jupyter notebook not working?

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.

Which interpreter is used in Jupyter notebook?

Language of choice Jupyter supports over 40 programming languages, including Python, R, Julia, and Scala.

How do you fix a name error in Jupyter notebook?

To solve this issue you have to just run the cell first that has import pandas as pd statement. Then run the other cell. It will clearly remove the nameerror name pd is not defined error. You can see you are now not getting any error.


1 Answers

You must have installed jupyter with another package manager such as pip. You can try pip uninstall jupyter followed by brew install jupyter.

If you get the message:

Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
Could not symlink bin/jupyter 
Target /usr/local/bin/jupyter already exists.

You can try brew link --overwrite jupyter as suggested.

like image 110
Imran Avatar answered Oct 05 '22 03:10

Imran