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

相关推荐
资深设备全生命周期管理2 天前
在线测试来料公差
python·pip
bjxiaxueliang3 天前
一文详解PyTorch环境搭建:M芯Mac通过pip安装PyTorch开发环境
pytorch·macos·pip
ssslar10 天前
Flutter PIP 插件 ---- iOS Video Call 自定义PIP WINDOW渲染内容
flutter·ios·pip
假意诗人13 天前
Python3笔记之号称替代pip的uv包管理器
python·pip·uv
猫头虎13 天前
最新如何在服务器中解决FFmpeg下载、安装和配置问题教程(Linux|Windows|Mac|Ubuntu)
linux·服务器·windows·ffmpeg·音视频·pip·视频编解码
GDAL14 天前
Conda与Pip:Python包管理工具的对比与选型
python·conda·pip
再玩一会儿看代码15 天前
pip 与 conda 的全面比较:Python 包管理的深度解析
经验分享·笔记·python·conda·课程设计·pip
Eiceblue15 天前
使用Python写入JSON、XML和YAML数据到Excel文件
xml·开发语言·vscode·python·json·excel·pip
李雨非-19期-河北工职大16 天前
“pip“ is not recognized(pip无法被识别)
pip
mzak16 天前
已经安装了pip,出现pip command not found【解决方法】
linux·pip·python3