Python pip安装使用国内镜像源
在国内用pip安装python库,不出意外,速度很慢,也很容易失败,解决的方法是使用国内的镜像源,国内的镜像源有:
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
使用国内镜像源的方法是
pip install -i ** 镜像源** 要装的库
例如用清华镜像源安装pandas库,就可以在命令窗口输入下面代码
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas