赞
踩
python 通过pip下载依赖如果提示 Read timed out,则基本可以确定是镜像地址网络超时,处理办法:指定可用的镜像地址进新下载。
国内常用镜像地址:
阿里云 http://mirrors.aliyun.com/pypi/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
实际使用时,pip install <所下载包名> -i <指定所用镜像地址>
,以 mysql-connector
为例,如下:
python -m pip install mysql-connector -i https://pypi.mirrors.ustc.edu.cn/simple/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。