在python中找不到满足要求的版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49745105/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 19:13:58  来源:igfitidea点击:

Could not find a version that satisfies the requirement in python

pythonpipvirtualenv

提问by sshah

I am trying to create virtual env with python2 in mac os from here. While running pip install virtualenvcommand in terminal I am getting following error.

我正在尝试从这里在 mac os 中使用 python2 创建虚拟环境。pip install virtualenv在终端中运行命令时,出现以下错误。

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

回答by shammerw0w

Run this command and try again

运行此命令并重试

curl https://bootstrap.pypa.io/get-pip.py | python

The detailed description can be found in the linkshared by Anupam in the comments.

详细说明可以在Anupam 在评论中共享的链接中找到。

回答by Bharath KM

If you are using python 3.x, Please try this commands

如果您使用的是python 3.x,请尝试此命令

sudo pip3 install --upgrade pip

sudo pip3 install virtualenv

须藤 pip3 install --upgrade pip

须藤 pip3 安装 virtualenv

回答by Kamal

Please try below commands

请尝试以下命令

pip install --upgrade virtualenv

回答by Anthony Petrillo

We tried the above but they didn't work in our case because we had two versions of python3 on the systems. One via a normal install a few months back and one via brew (on a Mac). When we discovered that, we downloaded and installed the latest version from python.org and as a result the pip was updated too. Once the pip was installed the sudo pip3 install virturaenv command worked fine.

我们尝试了上述方法,但它们在我们的案例中不起作用,因为我们在系统上有两个版本的 python3。一个通过几个月前的正常安装,一个通过 brew(在 Mac 上)。当我们发现时,我们从 python.org 下载并安装了最新版本,结果 pip 也更新了。安装 pip 后, sudo pip3 install virturaenv 命令工作正常。

回答by sk3k

If you are using Windows, you have to run cmd as admin.

如果您使用的是 Windows,则必须以管理员身份运行 cmd。