PIP为什么以cent os返回语法错误

时间:2018-07-15 12:00:25

标签: pip

我刚刚开始python编程。我使用的是cent os 6.6机器,已经安装了python 2.7。但是,我通过下载tar球安装了python 3.7。到此为止,一切都很好。然后我执行了“ pip install --upgrade pip”,向我显示了卸载pip 2.8和安装pip 2.10。在这之后,我所有的pip命令都向我返回语法错误。例如

[root@DKB-cluster ~]# pip --help
Traceback (most recent call last):
  File "/usr/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/usr/lib/python2.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/usr/lib/python2.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/usr/lib/python2.6/site-packages/pip/_internal/index.py", line 526
    {str(c.version) for c in all_candidates},
                      ^
SyntaxError: invalid syntax

请帮助我

0 个答案:

没有答案