我没有root访问权限,我想从头开始安装python。 所以我下载了python源代码并编译它。 接下来我想安装easy_install
。 但是当我运行python get-pip.py
时,我得到了这个错误:
ImportError: cannot import name HTTPSHandler
没有root访问权限,然后我无法安装所需的东西。 所以我想也许我可以用easy_install
安装easy_install
,所以我去安装了setuptools
,其中有easy_install
。 但是当我运行easy_install pip
我得到这个错误:
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
那么现在如何安装easy_install
? 我真的要疯了!
编辑:我不能使用virutalenv
这并不准确地回答原始问题,但如果您不幸尝试在centos6上安装
pip
witheasy_install
,我希望这会有所帮助。这曾经工作,但现在失败,错误如下:
我猜http://pypi.python.org认真地要求
https
。 如果你做了这个小黑客,那么easy_install pip
就可以工作。sed --in-place 's#http://pypi.python.org#https://pypi.python.org#g' /usr/lib/python2.6/site-packages/setuptools/command/easy_install.py