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

相关推荐
蜗牛去旅行吧5 天前
解决 `pip is configured with locations that require TLS/SSL` 错误
网络协议·ssl·pip
来自于狂人6 天前
解决 `pip install open-webui` 时的编译错误:Microsoft Visual C++ 14.0 或更高版本缺失
c++·microsoft·pip
余将董道而不豫兮7 天前
pip 与 conda 的故事
人工智能·python·深度学习·conda·pip
Yuezero_8 天前
【BUG】conda虚拟环境下,pip install安装直接到全局python目录中
pytorch·python·conda·bug·pip
uncle_ll9 天前
复制conda虚拟环境的几种方法
conda·pip·虚拟环境·pyenv·minconda
ssslar11 天前
Flutter PIP 插件 ---- iOS Video Call
flutter·ios·pip
ssslar11 天前
Flutter PIP 插件 ---- Android
android·flutter·pip
cuber膜拜18 天前
Linux(Centos)安装allnnlp失败,jsonnet报错
linux·centos·pip
纪伊路上盛名在1 个月前
生信软件管家——conda vs pip
linux·python·conda·学习方法·pip
Lucky_Turtle1 个月前
maven、npm、pip、yum官方镜像修改文档
npm·maven·pip