首页 > Windows开发 > 详细

windows 安装django 报错

时间:2020-01-12 19:34:29      阅读:101      评论:0      收藏:0      [点我收藏+]

报错信息如下:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError (‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000015EC9DBCD68>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed‘)‘: /simple/virtualenv/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError (‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000015EC9DBC630>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed‘)‘: /simple/virtualenv/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError (‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000015EC9DBC6D8>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed‘)‘: /simple/virtualenv/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError (‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000015EC9DBC668>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed‘)‘: /simple/virtualenv/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError (‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000015EC9DBC0B8>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed‘)‘: /simple/virtualenv/ ERROR: Could not find a version that satisfies the requirement virtualenv (from versions: none) ERROR: No matching distribution found for virtualenv

 

 

【解决】

1.

通过镜像安装django 如:pip install django==1.9.8 -i https://pypi.tuna.tsinghua.edu.cn/simple

 

2.

通过镜像安装virtualenv 如:pip install virtualenv -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

 

3.

所以推荐使用virtualenvwrapper:通过镜像安装 如:pip install virtualenvwrapper-win -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

 

4.

创建完成后,使用mkvirtualenv testvir2 自动进入虚拟环境 通过workon 来查看当前有哪些虚拟环境;进入虚拟环境 workon +虚拟环境

windows 安装django 报错

原文:https://www.cnblogs.com/yanhuidj/p/12183370.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!