pip安装修改镜像源

使用pip安装报错时,例如

raise ReadTimeoutError(self._pool, None, "Read timed out.")

pip._vendor.urllib3.exceptions.ReadTimeoutError:

HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed

out

可以选择国内的镜像源,如下:

清华源: https://pypi.tuna.tsinghua.edu.cn/simple/

阿里云: http://mirrors.aliyun.com/pypi/simple/

中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban):http://pypi.douban.com/simple/

清华大学: https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学: http://pypi.mirrors.ustc.edu.cn/simple/

选用的是清华源

修改为

复制代码
 pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/
相关推荐
心 爱心 爱1 天前
pip 隔离环境内 安装 cuda 113 不覆盖原有的全局 cuda 115
pip·cuda·隔离环境
万粉变现经纪人3 天前
如何解决 pip install mysqlclient 报错 ‘mysql_config’ not found 问题
数据库·python·mysql·pycharm·bug·pandas·pip
hui函数4 天前
如何解决 pip install 编译报错 ‘cl.exe’ not found(缺少 VS C++ 工具集)问题
开发语言·c++·pip
hui函数4 天前
Python系列Bug修复|如何解决 pip install 安装报错 invalid command ‘bdist_wheel’(缺少 wheel)问题
python·bug·pip
hui函数4 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有索引未设为 trusted-host 导致拒绝 问题
python·bug·pip
hui函数4 天前
Python系列Bug修复|如何解决 pip install 安装报错 Backend ‘setuptools.build_meta’ 不可用 问题
python·bug·pip
hui函数4 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有仓库认证失败 401 Unauthorized 问题
python·bug·pip
hui函数4 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 子目录可编辑安装缺少 pyproject.toml 问题
python·bug·pip
hui函数5 天前
如何解决 pip install 编译报错 g++: command not found(缺少 C++ 编译器)问题
开发语言·c++·pip
hui函数5 天前
Python系列Bug修复|如何解决 pip install -e . 安装报错 “后端不支持可编辑安装(PEP 660)” 问题
python·bug·pip