找不到满足要求的版本 easy_install(来自版本:)

Could not find a version that satisfies the requirement easy_install (from versions: )

Python 2.7.12

pip 8.1.2

ubuntu-16.04

我正在尝试安装 pycurl 使用:

pip install pycurl

这是我得到的,

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8EU20I/pycurl/

所以,我尝试像这样更新设置工具:

pip install --upgrade easy_install -U setuptools

我得到了

Could not find a version that satisfies the requirement easy_install (from versions: ) No matching distribution found for easy_install

我不知道我错过了什么。请帮帮我!

这里的问题是您正在尝试升级系统 Python 中安装的 setuptools,这需要更改 "normal" 用户赢得的文件系统区域没有(需要 root 权限)。

在命令前加上 sudo 可能会有帮助,但您应该问问自己是否真的要更改系统 Python,因为某些操作系统需要 Python "as installed"用于各种系统用途。

在你有写入权限的地方安装 Python 的第二个副本要安全得多(我个人倾向于使用 /usr/local 但 YMMV)然后你就不必担心破坏你的系统。此外,只要您将 PATH 设置为包含 /usr/local/bin,您就可以使用 python 命令来 运行 它。

sudo apt-get install python-pycurl

这解决了问题。

删除虚拟环境文件夹并recreate/reinstall使用 virtualenv sampleenv .这可能会解决你的问题