I'm attempting to install ipython on a CentOS 6.5 box using pip, but I get an error because it is attempting to use python 2.6 instead of 2.7.
By default, I'm running python 2.6
$ python -V
Python 2.6.6
Which is located in /usr/bin/python
$ which python
/usr/bin/python
I've also installed python 2.7 and it is located in usr/local/bin/
$ which python2.7
/usr/local/bin/python2.7
I would like to install the latest version of ipython, and I'm using pip to do this.
$ sudo pip install ipython
Downloading/unpacking ipython
Downloading ipython-2.2.0.tar.gz (11.9MB): 11.9MB downloaded
Running setup.py (path:/tmp/pip_build_root/ipython/setup.py) egg_info for package ipython
ERROR: IPython requires Python version 2.7 or 3.3 or above.
Complete output from command python setup.py egg_info:
ERROR: IPython requires Python version 2.7 or 3.3 or above.
I can see that the setup.py script for ipython is determining the active version here:
v = sys.version_info
if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
error = "ERROR: IPython requires Python version 2.7 or 3.3 or above."
print(error, file=sys.stderr)
sys.exit(1)
PY3 = (sys.version_info[0] >= 3)
How can I override the version that pip is assessing by default? Should I make a symbolic link to the python 2.7 in /usr/local/bin? Simply updating my bash profile with an alias for python at /usr/local/bin/python2.7 does not do the trick. Thanks.
/usr/bin/pip), it will be for the Python provided by your distro.