ImportError: No module named pip

前端 未结 19 753
时光取名叫无心
时光取名叫无心 2020-12-04 06:56

OS: Mac OS X 10.7.5 Python Ver: 2.7.5

I have installed setuptools 1.0 with ez_setup.py from https://pypi.python.org/pypi/setuptools Then I download pip.1.4.1 pkg fr

19条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 07:27

    I solved a similar error on Linux by setting PYTHONPATH to the site-packages location. This was after running python get-pip.py --prefix /home/chet/pip.

    [chet@rhel1 ~]$ ~/pip/bin/pip -V
    Traceback (most recent call last):
      File "/home/chet/pip/bin/pip", line 7, in 
        from pip import main
    ImportError: No module named pip
    
    [chet@rhel1 ~]$ export PYTHONPATH=/home/chet/pip/lib/python2.6/site-packages
    
    [chet@rhel1 ~]$ ~/pip/bin/pip -V
    pip 9.0.1 from /home/chet/pip/lib/python2.6/site-packages (python 2.6)
    

提交回复
热议问题