python常见问题

一、下载库失败

1、超时

换源即可,参考地址:https://blog.csdn.net/weixin_44407699/article/details/104769272

【国内镜像大全】

阿里云 https://mirrors.aliyun.com/pypi/simple/
豆瓣(douban) https://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/

【换源命令】

临时:pip命令+ -i +镜像地址。例如 pip install numpy -i https://mirrors.aliyun.com/pypi/simple/

永久:在更新到最新版本pip后,pip config set global.index-url+国内镜像地址,例如

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

2、pip/python: normal site-packages is not writeable

参考地址:https://*.com/questions/59997065/pip-python-normal-site-packages-is-not-writeable/65290638

上一篇:linux下conda换源


下一篇:国内npm和electron镜像地址配置记录