简体   繁体   English

Python 3.5 pip版本与python 2.7冲突

[英]Python 3.5 pip version conflict with python 2.7

I am trying to install a software using pip install and my python and pip versions are 3.5. 我正在尝试使用pip install安装软件,而我的python和pip版本为3.5。 but when I run sudo pip install -e . 但是当我运行sudo pip install -e . I get the following error. 我收到以下错误。

Traceback (most recent call last):
  File "/usr/local/bin/pip3.5", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2675, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==8.1.0

Why Do I get an error with python 2.7 and please some one could sortout my issue. 为什么我的python 2.7出现错误,请有人可以解决我的问题。

Your pip version and python versions are separate. 您的pip版本和python版本是分开的。 It looks like your package requires exactly pip 8.1.0. 看来您的套件要求的精确度是8.1.0。 You have to either upgrade/downgrade to that version first, or modify the software to work with whichever pip you have available. 您必须先将其升级/降级到该版本,或者修改软件以使其与可用的任何pip一起使用。

Also, it may be easier to install the software in a virtual environment rather than system/global one. 同样,将软件安装在虚拟环境中而不是系统/全局环境中可能更容易。 Changing the system version of pip may break either current apps, or the future pip package updates. 更改点子的系统版本可能会中断当前应用或将来的点子包更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM