使用pip安装模块,有时候会出现超时等情况,如图
解决办法:换成国内源进行python模块安装。
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple module_name
以下是国内源地址:
清华: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/