1、临时修改

# 在安装命令后加上指定源选项

  pip install pymysql -i https://mirrors.aliyun.com/pypi/simple/

2、永久修改

  mkdir /root/.pip
  touch /root/.pip/pip.conf

  vim pip.conf

    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/

2、附上几个常用的国内源,大家自己选择:

阿里云 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/

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-02-20
  • 2021-08-26
  • 2022-12-23
相关资源
相似解决方案