# 使用阿里云源
pip install some-package -i https://mirrors.aliyun.com/pypi/simple/
# 或者配置全局源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
-i
参数,后面跟上镜像源的 URL。例如,使用阿里云的镜像源来安装 some-package
。pip config set
命令将镜像源设置为全局默认。这样以后每次使用 pip install
都会自动从指定的镜像源下载包。如果你需要其他国内常用的镜像源,可以参考以下列表:
https://pypi.tuna.tsinghua.edu.cn/simple/
http://pypi.douban.com/simple/
https://pypi.mirrors.ustc.edu.cn/simple/
希望这些信息对你有帮助!
上一篇:python range(10)
下一篇:python 文件夹下的文件名
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站