pip 镜像源测试,配置镜像源教程

一些说明

查看当前的 pip 镜像源

复制代码
pip config list

这个命令什么都不显示,说明从来没有配置过

查看所有包的列表

复制代码
pip list

删除包

复制代码
pip uninstall

查看某个包的详细信息

复制代码
pip show

清空所有pip 缓存

复制代码
pip cache purge

我选择以下包用来测试:Pandas,SciPy,Matplotlib

测试

清华大学镜像源【成功】

复制代码
pip install scipy -i https://pypi.tuna.tsinghua.edu.cn/simple/

-i: 它是 --index-url 的缩写。意思是:本次安装不使用默认源,而是指定一个临时的 URL

阿里云镜像源【成功】

复制代码
pip install scipy -i https://mirrors.aliyun.com/pypi/simple/

中国科学技术大学镜像【成功】

复制代码
pip install scipy -i https://pypi.mirrors.ustc.edu.cn/simple/

腾讯云镜像源【成功】

复制代码
pip install scipy -i https://mirrors.cloud.tencent.com/pypi/simple/

华为云镜像源【成功】

复制代码
pip install scipy -i https://repo.huaweicloud.com/repository/pypi/simple/

将镜像源永久修改

随便选择一个自己喜欢的镜像源,例如,我选择阿里云

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

**index-url:**这是配置项的名称,意思是"索引地址",就是 pip 去哪里下载包

打开输出的这个文件路径看一下【C:\Users\86195\AppData\Roaming\pip\pip.ini】

测试一下

复制代码
pip install scipy
相关推荐
大连好光景1 天前
conda管理包还是pip管理包
python·conda·pip
万粉变现经纪人1 天前
如何解决 pip install cx_Oracle 报错 未找到 Oracle Instant Client 问题
数据库·python·mysql·oracle·pycharm·bug·pip
万粉变现经纪人2 天前
如何解决 pip install pillow-simd 报错 需要 AVX2/特定编译器 支持 问题
python·scrapy·beautifulsoup·aigc·pandas·pillow·pip
YMWM_3 天前
‘pip install -e .‘ and ‘pip install .‘
pip·pip install
請你喝杯Java3 天前
Python 后端开发:从虚拟环境、pip、requirements.txt 到项目启动
开发语言·python·pip
Hello.Reader3 天前
PySpark 安装保姆级教程pip、Conda、手动安装、Spark Connect 一次讲透(一)
python·spark·conda·pip
N盒4 天前
【WhisperX+M2M100】快速视频转字幕工具
python·pip
查尔char7 天前
CentOS 7 编译安装 Python 3.10 并解决 SSL 问题
python·centos·ssl·pip·python3.11
@zulnger7 天前
数据采集的基本知识
python·pip
水淹萌龙8 天前
Agent配置MCP并通过uvx指定pip源
pip