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

相关推荐
正在走向自律13 小时前
Conda 完全指南:从环境管理到工具集成
开发语言·python·conda·numpy·fastapi·pip·开发工具
小猪写代码16 小时前
在 Ubuntu 20.04.6 LTS 中将 SCons 从 3.1.2 升级到 4.9.1
chrome·ubuntu·pip
tyn1883 天前
记录一次conda虚拟环境pip安装报错[WinError 32] 另一个程序正在使用此文件,进程无法访问
windows·conda·pip·虚拟环境·虚环境
量化金策3 天前
枢轴支压点策略
pip·ipython
Levin__NLP_CV_AIGC5 天前
解决pip安装PyPI默认源速度慢
算法·pip
Penguido6 天前
基于 Nexus 在 Dockerfile 配置 yum, conda, pip 仓库的方法和参考
linux·docker·centos·conda·pip
d0ublεU0x007 天前
【生存技能】ubuntu 24.04 如何pip install
linux·ubuntu·pip
未名编程7 天前
【Flask开发踩坑实录】pip 安装报错:“No matching distribution found” 的根本原因及解决方案!
python·flask·pip
Xudde.7 天前
加速pip下载:永久解决网络慢问题
网络·python·学习·pip
ssslar8 天前
Flutter PIP 插件 ---- 为iOS 重构PipController, Demo界面,更好的体验
flutter·pip