关于django安装虚拟环境的错误

以下为https://pypi.doubanio.com/simple 源为例子

原本我是安装virtualenv和virtualenvwrapper-win

代码如下:
pip install virtualenv
pip install virtualenvwrapper-win

ERROR: Could not find a version that satisfies the requirement virtualenv (from versions: none) ERRO

这是由于网络不稳定,因此在安装模块时,指定国内镜像

pip install 包名 -i https://pypi.doubanio.com/simple/ --trusted-host pypi.douban.com

其后指定的 --trusted-host pypi.doubanio.com 是为了获得ssl证书的认证

所以代码是:

pip install virtualenv -i https://pypi.doubanio.com/simple/ --trusted-host pypi.douban.com

还有代码是:

pip install virtualenvwrapper-win -i https://pypi.doubanio.com/simple/ --trusted-host pypi.douban.com

最后不忘workon一下看一下安装有没有成功,如果出现

Pass a name to activate one of the following virtualenvs:
==============================================================================
找不到文件

那就是成功了!还没有创建虚拟环境镜像所以这里是找不到文件(镜像文件)

原文地址:https://www.cnblogs.com/xxxtony/p/13263214.html