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 天前
pip缓存配置
python·缓存·pip
做cv的小昊3 天前
【conda】打包已有conda环境并在其他服务器上搭建
运维·服务器·python·conda·运维开发·pip·开发
时光之源5 天前
程序猿常用命令行(Linux、Windows、Powershell、CMD、conda、pip、apt)
linux·conda·pip
小镇学者5 天前
【python】MacOS下永久配置pip镜像源
macos·pip
致宏Rex6 天前
uv 教程:安装、常用命令、项目结构与关键文件
python·pip·uv
芜湖xin7 天前
【解决Error】pip安装Flask失败
python·flask·pip
逆向编程8 天前
Ubuntu 虚拟机 Python3 + pip 完整安装教程
linux·ubuntu·pip
AmyLin_20018 天前
【pdf2md-2:关键核心】PDF 转 Markdown 技术拆解:两阶段流水线、四级标题检测与段落智能合并
windows·python·pdf·pip·pdf2md
li99yo11 天前
3DGS的复现
图像处理·pytorch·经验分享·python·3d·conda·pip
Dontla11 天前
用pip install -e .开发Python包时,Python项目目录结构(项目结构)(可编辑安装editable install)
python·pip