最近想更新一下python的第三方库
输入
pip install --outdate
但是半天没反应,这可能是pip源的问题。
因为pip默认是使用国外的源,在国内访问的话会非常慢。
这时候就需要更改默认源为国内源
pip国内的一些镜像
阿里云 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/
这里我使用的是清华的源,大家可以根据自己的情况合适选择源(这里是临时修改源)
pip list --outdate -i https://pypi.tuna.tsinghua.edu.cn/simple
想要一直修改的话
windows:
直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,