Python3.6使用国内镜像安装django1.11.29
0、django1.11.29最好安装在python3.6里,python3.7有点不兼容
1、pip的默认源在国外,pip install some_packages特别慢,经常会超时,导致安装失败
2、把pip 更换为国内的镜像,就可以很快的下载安装了。
pip install some_package --index https://pypi.mirrors.ustc.edu.cn/simple/ #使用清华大学的镜像
比如安装django库:
pip install django==1.11.29 --index https://pypi.tuna.tsinghua.edu.cn/simple
3、永久使用国内镜像
windows中,在Users目录下直接创建一个pip.ini文件,把下面内容保存即可。
4、常用的镜像
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/