python阿里云和官方源不好使切换豆瓣源解决问题
简书链接:python阿里云和官方源不好使切换豆瓣源解决问题
文章字数:283,阅读全文大约需要1分钟
首先是尝试使用官方源和阿里云 都出现了问题,最后切换豆瓣发现ok了
python.exe -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
2设置为信任源
pip config set install.trusted-host pypi.douban.com
D:\dev\ChatGPT\src\revChatGPT>pip config set global.index-url http://pypi.douban.com/simple
Writing to C:\Users\Administrator\AppData\Roaming\pip\pip.ini
如下图所示发现豆瓣没问题,我决定直接设置为永久豆瓣源,并笔记记录下来
1 | 豆瓣:http://pypi.douban.com/simple/ |
echo %HOMEPATH%
C:\Users\Administrator\AppData\Roaming\pip\pip.ini
找到配置文件永久信任源
1 | [global] |
设置代理
1 | [global] |
或者pip config set global.proxy http://127.0.0.1:1080
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 情迁博客!
评论