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 库名 即可

相关推荐
Yolanda_20222 天前
在vscode终端中可使用pip,但是cmd终端中找不到命令 pip问题的解决
vscode·python·conda·pip
Yolanda_20222 天前
pip安装jieba报错:由于目标计算器积极拒绝,无法连接
pip
lxw18449125144 天前
Python uv 完整使用教程
python·conda·pip·uv
我登哥MVP4 天前
Headroom 深度指南:AI Agent 上下文压缩实战
人工智能·python·深度学习·神经网络·机器学习·自然语言处理·pip
草莓熊Lotso9 天前
【LangChain】输出解析器全解:让大模型输出从 “聊天” 变 “机器可读”
服务器·数据库·python·langchain·pip
Li Ming&14 天前
Python办公自动化:利用Python批量将PDF转换为图片文件
python·pdf·pip
weigangwin16 天前
Graphiti 时间知识图谱:从 pip 安装到事实有效期验证
人工智能·知识图谱·pip
梦想不只是梦与想17 天前
Python 官方包管理器pip
python·pip
无糖冰可乐2119 天前
安装wsl2,并链接Windows上的vscode运行项目
pytorch·vscode·python·pip
猫头虎22 天前
城市级IP代理:赋能全球企业本地化数字增长与安全合规 | Decodo 德口多
网络·python·网络协议·tcp/ip·安全·pandas·pip