编程语言
首页 > 编程语言> > python – 使用easy_install安装pip

python – 使用easy_install安装pip

作者:互联网

我没有root访问权限,我想从头开始安装python.所以我下载了python源代码并编译了它.接下来我想安装pip.但是当我运行python get-pip.py时出现了这个错误:

ImportError:无法导入名称HTTPSHandler

没有root访问权限,我无法安装所需的东西.所以我想也许我可以用easy_install安装pip所以我去安装了easytoinstall的setuptools.但是当我运行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')

那么现在如何安装pip?我真的疯了!

编辑:我不能使用virutalenv

解决方法:

try this to install pip : “easy_install-2.7 -U –user pip”

**another important info** 

在Ubuntu,Debian或Linux Mint上安装pip:

$sudo apt-get install python-pip

在Fedora上安装pip:

$sudo yum install python-pip

要在CentOS上安装pip,首先启用EPEL存储库,然后运行:

$sudo yum install python-pip

在Archlinux上安装pip:

$sudo pacman -S python-pip

标签:easy-install,python,pip
来源: https://codeday.me/bug/20191005/1856879.html