pip install抛出值错误

时间:2015-10-26 20:22:27

标签: python install pip

我在Windows 8.1 64位操作系统上运行Python(x,y)2.7.10.0。我之前使用过pip来安装一些软件包,但现在我尝试了

pip install nltk
pip install pycallgraph
pip search nltk
pip install selenium

我收到以下错误

    C:\Python27\lib\site-packages\xy>pip search nltk
    Traceback (most recent call last):
      File "C:\Python27\Scripts\pip-script.py", line 5, in <module>
        from pkg_resources import load_entry_point
      File "build\bdist.win32\egg\pkg_resources.py", line 2880, in <module>
      File "build\bdist.win32\egg\pkg_resources.py", line 432, in _build_master
      File "build\bdist.win32\egg\pkg_resources.py", line 741, in require
      File "build\bdist.win32\egg\pkg_resources.py", line 586, in resolve
      File "build\bdist.win32\egg\pkg_resources.py", line 2714, in parse_requirements
      File "build\bdist.win32\egg\pkg_resources.py", line 2690, in scan_list
    ValueError: ("Expected ',' or end-of-list in", 'pip==7.0.3+xy.11', 'at', '+xy.11')

2 个答案:

答案 0 :(得分:4)

我在Windows上也有这个问题。无论我尝试用pip做什么,我都会收到这个错误。解决方案是:

python -m pip install -U pip setuptools

我在install-pip说明页面找到了它:https://packaging.python.org/installing/#install-pip-setuptools-and-wheel

答案 1 :(得分:0)

我遇到了同样的问题并升级到9.0.1并且像魅力一样!。