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

相关推荐
计算机学姐1 小时前
基于python+django+vue的在线学习资源推送系统
开发语言·vue.js·python·学习·django·pip·web3.py
BigYouYou18 小时前
Pytorch2.4.0自动安装cudnn9.1??? pip安装cudnn方法
pytorch·pip
计算机学姐2 天前
基于python+django+vue+MySQL的酒店推荐系统
开发语言·vue.js·后端·python·mysql·django·pip
计算机学姐3 天前
基于python+django+vue的农业管理系统
开发语言·vue.js·后端·python·django·pip·web3.py
计算机学姐3 天前
基于python+django+vue的视频点播管理系统
vue.js·python·mysql·django·pip·web3.py·ipython
MaiXiaochai3 天前
【pipenv】—— 虚拟环境管理工具近乎全面的总结
python·pip·虚拟环境·dev·pipenv·pipfile·pipefile.lock
AI浩4 天前
Conda和pip 清空缓存
conda·pip
2301_796982144 天前
在pycharm终端中运行pip命令安装模块时,出现了“你要如何打开这个文件”弹出窗口,是什么状况?
pip
zixingcai5 天前
Python\Scripts文件夹中只有pip3.exe而缺少pip.exe
python·pip
计算机学姐5 天前
基于python+django+vue的农产品销售管理系统
开发语言·vue.js·后端·python·django·numpy·pip