1.修改前建议更新pip版本到最新
pip3 install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl (1.5MB)
|████████████████████████████████| 1.5MB 20kB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.3.3
2.命令行修改源:
pip3 config set global.index-url https://pypi.douban.com/simple/
Writing to /Users/chenhang_vendor/.config/pip/pip.conf
3.查看当前源:
pip3 config list
显示:global.index-url='https://pypi.douban.com/simple/'
常用源:
阿里云http://mirrors.aliyun.com/pypi/simple/
清华大学https://pypi.tuna.tsinghua.edu.cn/simple/
中国科技大学https://pypi.mirrors.ustc.edu.cn/simple/
中国科学技术大学http://pypi.mirrors.ustc.edu.cn/simple/
豆瓣文章来源:https://www.toymoban.com/news/detail-613840.htmlhttps://pypi.douban.com/simple/文章来源地址https://www.toymoban.com/news/detail-613840.html
到了这里,关于Python3 pip3查看和设置当前镜像源的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!