0

I've had some issues with iPython notebook since installing it for the first time. I already had installed iPython via pip install, but then I decided to install Canopy Express to get all the packages and a easy-to-use package manager. I am on a MBP with latest Yosemite installed.

When I run ipython notebook via.

ipython notebook --pylab inline

in a terminal, notebook starts up fine in Chrome.

But, then i check the version of iPython with

import IPython
IPython.__version__

it says 0.12 -- which is not the latest version at all. And does not allow me for instance to use %matplotlib inline (as magic is not added to that version)

If I try

pip install ipython --upgrade

i get :

"Requirement already up-to-date: ipython in /usr/local/lib/python2.7/site-packages"

When I check Canopy package manager, it says I have 2.3.1-2.

Any ideas?

My hunch is, that I might have several different dependencies/installations of python or ipython and that mess things up.
Is there anyway I can completely remove everything and start afresh, or quickly rearrange my dependencies, such that they run via. Canopy?

PS. The first time I ran ipython notebook, I had just installed it using some guide, and I remember that it ran in something called jupyter?
Still with in a browser, but not with normal IP[y]:Notebook logo. Is that strange?

edit:

which -a ipython gives 

/Library/Frameworks/Python.framework/Versions/Current/bin/ipython
/usr/local/bin/ipython
/usr/local/bin/ipython
/usr/local/bin/ipython
/usr/local/bin/ipython

and

which -a python gives 

/Library/Frameworks/Python.framework/Versions/Current/bin/python
/usr/local/bin/python
/usr/local/bin/python
/usr/local/bin/python
/usr/local/bin/python
/usr/bin/python
Jonathan March
  • 5,800
  • 2
  • 14
  • 16
tmo
  • 1,393
  • 1
  • 17
  • 47
  • There are a couple of things here: Please add `which -a ipython` and `which -a python` to the question. The problem is that you have multiple python versions scattered across your path. `jupyter notebook` will be the new `IPython notebook` - no need to worry. However there is not a stable version out yet. – cel Jan 13 '15 at 11:23
  • I've added the edit, and also read up on "do's and dont's" when installing python. Looks like i'm guilty of a few of those. Are there anyway for me to remove all python (non-OSX related) and when do a clean install using Canopy? – tmo Jan 13 '15 at 12:59
  • You don't really have to clean those up. But you have to make sure that your `PATH` variable is consistent and prefers the correct interpreter. Installing `canopy` will probably set the `PATH` variable correctly. I guess it will work out of the box. If not you will have to adjust the `PATH` variable manually. – cel Jan 13 '15 at 13:17

1 Answers1

1

I will self-answer this one.

1) Removed all non-OSx related python, following this: How to uninstall Python 2.7 on a Mac OS X 10.6.4?

2) Had a look in both .profile and .bash_profile. Deleted all past python dependencies (even had one to Anaconda). Easy using open -a TextEdit .profile

3) Reboot

4) Install Canopy Express. This is where I ran into new problems, as Canopy would not set itself as default python via the GUI. Fixed this by changing .profile and .bash_profile. See more here.

5) Ran ipython notebook %pylab --inline in terminal, and now I have updated iPython!

Community
  • 1
  • 1
tmo
  • 1,393
  • 1
  • 17
  • 47
  • Also see https://support.enthought.com/entries/22305234-IPython-Installed-version-in-the-Package-Manager-is-not-being-used-in-the-Canopy-GUI (re IPython version in Canopy) – Jonathan March Jan 14 '15 at 12:19
  • And https://support.enthought.com/entries/23580651-Uninstalling-and-resetting-Canopy (re deleting detritus, now moot) – Jonathan March Jan 14 '15 at 12:21