pip换源

文章目录

pip换源详解

一、pip是什么

pip 是 Python 中的标准库管理器。它允许你安装和管理不属于 Python标准库 的其它软件包

二、pip换源

国内比较好的PyPI源库有

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple

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

1.1临时换源

tex 复制代码
#清华源
pip install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple
# 阿里源
pip install markdown -i https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip install markdown -i http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip install markdown -i http://pypi.douban.com/simple/

临时换源就是在pip install 库 后面直接加上 -i 换源地址

1.2 永久换源

tex 复制代码
# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/# 换回默认源pip config unset global.index-url

设置完成以后直接使用pip intall 库名 即可

相关推荐
master3362 天前
python 安装pip
开发语言·python·pip
2601_961875242 天前
花生十三资料1200题|题库|刷题
conda·pytest·pillow·pip·web3.py·ipython·gunicorn
FBI HackerHarry浩4 天前
解决pip 安装 numpy 时元数据生成失败
numpy·pip
砍材农夫4 天前
python环境|pip|uv|venv|Conda区别
后端·python·conda·pip·uv
砍材农夫6 天前
python 如何一次性安装项目所有依赖包(pip和uv)
开发语言·python·pip·uv
小白弄潮儿6 天前
Conda 使用入门指南(续):解决 pip 安装问题与最佳实践
conda·pip
Orchestrator_me7 天前
Python pip install报SSL错误
python·ssl·pip
CV-deeplearning7 天前
NVIDIA CV-CUDA:GPU 全流程加速计算机视觉,pip 一键安装替代 OpenCV,微软/腾讯/百度/字节全在用,云级图像处理吞吐量飙升 10 倍
opencv·计算机视觉·pip·nvidia·cuda·gpu加速·cv-cuda
veminhe9 天前
关于下载pip install faiss-cpu失败的问题
python·pip·faiss
xufengzhu9 天前
Python库PyMySQL的使用指南
开发语言·python·pip