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

相关推荐
万粉变现经纪人4 天前
何解决PyCharm中pip install安装Python报错ModuleNotFoundError: No module named ‘json’问题
python·pycharm·json·beautifulsoup·scikit-learn·matplotlib·pip
小喵要摸鱼6 天前
pip 和 conda,到底用哪个安装?
conda·pip
未名编程6 天前
【已解决】报错:WARNING: pip is configured with locations that require TLS/SSL
网络协议·ssl·pip
Yc98018 天前
解决:开启魔法后vscode pip命令不能安装中科大python镜像问题
vscode·python·pip
万粉变现经纪人9 天前
如何解决pip安装报错ModuleNotFoundError: No module named ‘transformers’问题
人工智能·python·beautifulsoup·pandas·scikit-learn·pip·ipython
我是李武涯9 天前
conda pip uv与pixi
conda·pip·uv
ghostwritten11 天前
在 macOS 上 安装最新 Python 和 pip
python·macos·pip
万粉变现经纪人11 天前
如何解决pip安装报错ModuleNotFoundError: No module named ‘keras’问题
人工智能·python·深度学习·scrapy·pycharm·keras·pip
万粉变现经纪人14 天前
如何解决pip安装报错ModuleNotFoundError: No module named ‘scikit-learn’问题
人工智能·python·plotly·pycharm·flask·scikit-learn·pip
liliangcsdn14 天前
linux pip/conda 修改默认cache位置
linux·运维·pip