问题
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
回答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!
来源:https://stackoverflow.com/questions/27919761/ipython-notebook-wont-upgrade-always-runs-in-v-0-12