This issue can be caused by: multiple python installs, virtualenvs, and/or broken python path variable. If you are using homebrew on mac or anaconda distribution, it can also cause version conflicts with pip and subsequent package installations.
First thing to check is which python interpreter the system thinks it is using:
$ which python
$ which python2.7
this will tell you which is the currently activated python. Also check:
$ which ipython
My guess is that you have 2 or more versions of python installed on your system, and you used pip to get ipython for some active python version as specified by the path variable; pip got confused along the way.
Check your path variable in your bash settings (i.e. .bashrc
or .profile
), and you may want to set the version that you want. You would want to use the correct pip variant depending on whether you want to use /usr/local/bin/
or /opt/local/bin/python2.7
.
Here's more info: