4

I am having trouble getting my ipython to work after a regular python upgrade. If I type:

ipython notebook --pylab inline

I get the following error:

-bash: /usr/local/bin/ipython: No such file or directory

If I type:

which ipython

I get no response, just the command line prompt. if I type:

which python

I get

/usr/bin/python

if I type:

ipython --version

I get the following error:

-bash: /usr/local/bin/ipython: No such file or directory

When I inspect my system I see that my Ipython is installed in:

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Ipython

What should I do to make my ipython function again? I had to fix the links for pip and easy_install to get them to work after the python installation. I just can't seem to get ipython working again.

klitz1967
  • 245
  • 3
  • 12

3 Answers3

0
pip install -U "ipython[notebook]"

You may need to prefix this with sudo for authorization purposes:

sudo pip install -U "ipython[notebook]"

Replace pip with pip3 to install for Python 3.

Further install documentation is here.

Jonathan Eunice
  • 21,653
  • 6
  • 75
  • 77
  • Jonathan this didn't work. I got the following response:'Requirement already up-to-date: ipython[notebook] in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages ' – klitz1967 Mar 20 '15 at 00:27
  • Hmmm. Try an uninstall first. `pip uninstall ipython` (with possible `sudo`). Please also state what platform and platform version you're using. Mac, Windows, Linux, ...? – Jonathan Eunice Mar 20 '15 at 00:33
  • Good idea. Mac OSX 10.10.2, python is 2.7.9 installed following steps 1-6 in [link](http://wolfpaulus.com/jounal/mac/installing_python_osx/) – klitz1967 Mar 20 '15 at 00:42
  • using `sudo pip uninstall ipython` uninstalled ipython. Re-installing and attempting to run `ipython notebook --pylab inline` produces `-bash: /usr/local/bin/ipython: No such file or directory` – klitz1967 Mar 20 '15 at 00:51
  • It seems that it's trying execute ipython in an executable at `/usr/local/bin/ipython` that doesn't exist in the build. Is there a way to change it to point to where the executable actually is? – klitz1967 Mar 20 '15 at 00:55
  • Try typing this in bash: `export PYTHONPATH=/usr/local/lib/python2.7/site-packages/`. Then try running IPython. I have a hunch your latest Python install is storing its packages in a new location. – Jonathan Eunice Mar 20 '15 at 00:56
  • I just tried the export command above. Then tried running ipython. same bash error `bash: /usr/local/bin/ipython: No such file or directory` – klitz1967 Mar 20 '15 at 01:00
  • Is there a way to build ipython such that it loads into `/usr/bin/ipython` like my pip, easy_install, and python installation? Or use a command link `ln` to link where the executable actually is? – klitz1967 Mar 20 '15 at 01:01
  • 2
    I finally figured out how to solve this: `sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython /usr/bin/ipython` linked my ipython to where it was hoping to find it. stackoverflow won't allow me to enter my answer as an answer :) – klitz1967 Mar 20 '15 at 01:07
  • I had created a symlink (to an anaconda distribution that I deleted) at /usr/local/bin/ipython. After deleting that link, I ran `pip uninstall ipython` followed by `pip install ipython`, and everything worked! – farenorth Aug 16 '15 at 06:43
0

I can recommend using Canopy (or Anaconda) as a package manager. Canopy, which I use, has its own terminal. Since I started using Canopy to manage my iPython environment, things have just been easier. Pip install/upgrades work like a charm every time, and I dont have to worry about mixing up python installations ect.

See this post for more info.

PS. This should probably be a comment, but don't have enough rep yet to comment :-)

Community
  • 1
  • 1
tmo
  • 1,393
  • 1
  • 17
  • 47
0

This should be updated to be

pip install jupyter 

From

ImportError: No module named notebook.notebookapp

Community
  • 1
  • 1
Lois Keller
  • 141
  • 10