python - pip更换阿里源
作者:
_Rango_ | 来源:发表于
2020-01-14 10:52 被阅读0次
创建 .pip
文件夹
$ mkdir ~/.pip
新建 ~/.pip/pip.conf
配置文件
$ touch ~/.pip/pip.conf
写入规则
$ vim ~/.pip/pip.conf
$ cat ~/.pip/pip.conf
[global]
index-url=http://mirrors.aliyun.com/pypi/simple
[install]
trusted-host=mirrors.aliyun.com
国内其他pip源
pip参数使用特定源
$ pip install -i http://mirrors.aliyun.com/pypi/simple/ flask
# 或
$ pip install --index http://mirrors.aliyun.com/pypi/simple/ flask [--trusted-host mirrors.aliyun.com]
参考
- Centos7下更换python pip3源为阿里源
- Python pip 国内镜像大全及使用办法
- https://blog.csdn.net/qq_41906429/article/details/95252447
本文标题:python - pip更换阿里源
本文链接:https://www.haomeiwen.com/subject/ysioactx.html
网友评论