pip运行错误

错误:

[root@centos64 numpy-1.13.1]# pip install numpy-1.13.1-cp27-cp27m-manylinux1_x86_64.whl
Traceback (most recent call last):
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 659, in _build_master
    ws.require(__requires__)
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 967, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 858, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pip 9.0.1 (/usr/local/python-3.3/lib/python3.6/site-packages), Requirement.parse('pip==7.1.0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3017, in <module>
    @_call_aside
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3030, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 661, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 674, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/python-3.3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 853, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==7.1.0' distribution was not found and is required by the application

原因:

同一个系统上安装了多个不同的版本的pip, 运行pip时需要用绝对路径指定运行相应版本的pip。

 

 /dat3/wasp/anaconda_py27/bin/pip install  numpy-1.13.1-cp27-cp27m-manylinux1_x86_64.whl
numpy-1.13.1-cp27-cp27m-manylinux1_x86_64.whl is not a supported wheel on this platform.

/dat3/wasp/anaconda_py27/bin/pip install  numpy
Requirement already satisfied: numpy in /dat3/wasp/anaconda_py27/lib/python2.7/site-packages

 

posted @ 2017-08-09 21:03 emanlee 阅读(...) 评论(...) 编辑 收藏