python 镜像源配置

1.1 手动添加镜像源

使用方法:pip install 包名 -i 所用镜像源网址(这里我用的清华源)

1) pip install 下载的模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple

1.2 永久添加镜像源

使用方法一:打开cmd 添加如下命令

1) pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

使用方法二:在C盘下创建一个名叫pip的文件夹,在文件夹内创建一个名为pip.ini的文档,添加如下内容,将pip路径添加到环境变量。

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

1.3 国内镜像源 

① 阿里镜像 :  https://mirrors.aliyun.com/pypi/simple/

② 百度镜像:

 https://mirror.baidu.com/pypi/simple/

③ 清华镜像:

https://pypi.tuna.tsinghua.edu.cn/simple/

④ 中科大镜像:

 https://pypi.mirrors.ustc.edu.cn/simple/

  ⑤ 豆瓣镜像:

http://pypi.douban.com/simple/

  ⑥ 搜狐镜像:

http://mirrors.sohu.com/Python/

    ⑦ 华中科大镜像:

https://pypi.hustunique.com/

    ⑧ 山东理工大学镜像:

https://pypi.hustunique.com/

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
扎眼的阳光的头像扎眼的阳光普通用户
上一篇 2023年3月10日 下午1:27
下一篇 2023年3月10日 下午1:30

相关推荐