Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
pip安装失败-错误:IPython需要Python版本2.7或3.3或更高版本_Python_Python 2.7_Pip_Python 2.6 - Fatal编程技术网

pip安装失败-错误:IPython需要Python版本2.7或3.3或更高版本

pip安装失败-错误:IPython需要Python版本2.7或3.3或更高版本,python,python-2.7,pip,python-2.6,Python,Python 2.7,Pip,Python 2.6,我今天在centos 6.4上安装了pip,并尝试通过pip安装python库 但是,我得到了以下错误 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. ----------------------

我今天在centos 6.4上安装了pip,并尝试通过pip安装python库

但是,我得到了以下错误

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.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_username/ipython
Storing debug log for failure in /home/username/.pip/pip.log
虽然错误消息说我需要Python 2.7或更高版本,但我已经安装了Python 2.7

$ which python
/usr/local/bin/python
$ python --version
Python 2.7.8
我不确定我在“usr/bin/python”中使用了python2.6是否导致了这个问题


如果您有两条蟒蛇,那么您也可能有两条
pip
s。这很可能意味着您正在从Python2.6发行版运行pip。如果您要运行Python2.7版本,它肯定会使用Python2.7。如果您只有Python2.6版本,那么必须再次安装pip,对于2.7版本,则需要单独安装

有效的命令,由OP发布在评论部分:

curl -kL raw.github.com/pypa/pip/master/contrib/get-pip.py | python
另外,不要忘记(这可能不太清楚),如果您运行“sudo pip install”,您可能会得到与运行非sudo时不同的pip。

相关:
curl -kL raw.github.com/pypa/pip/master/contrib/get-pip.py | python