php网站插件删除或添加,那个相亲网站做的比较好,线上外包平台,平度做网站在Python中使用pip换源的方法可以通过修改pip配置文件来实现。具体步骤如下#xff1a;
暂时修改#xff08;只应用于本次下载#xff09;
pip install 库名 -i 国内源链接/simple --trusted-host 国内源链接
常见的国内源链接见下方永久修改中的内容。
示例#xff1a…在Python中使用pip换源的方法可以通过修改pip配置文件来实现。具体步骤如下
暂时修改只应用于本次下载
pip install 库名 -i 国内源链接/simple --trusted-host 国内源链接
常见的国内源链接见下方永久修改中的内容。
示例用清华源下载 opencv pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
长期永久修改
找到 pip 所在目录
注Windows环境下位置在 Pyhton安装目录\Lib\site-packages\pip
打开配置文件pip.ini如果不存在可以新建一个并添加以下内容
# coding: GBK
[global]
index-url 国内源链接/simple
[install]
trusted-host 国内源链接以下是一些常见的国内源及对应的链接
清华大学镜像源https://pypi.tuna.tsinghua.edu.cn/simple/豆瓣源https://pypi.douban.com/simple/阿里云https://mirrors.aliyun.com/pypi/simple/
根据需要选择一个合适的源并将对应链接替换到pip配置文件中即可。
保存并关闭文件重新运行 pip 命令即可。
示例配置最常用的清华源
# coding: GBK
[global]
index-url https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host https://pypi.tuna.tsinghua.edu.cnPip 使用帮助
使用国内源升级 pippip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U指定版本安装库pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 库名版本号卸载库pip uninstall 库名查看库详情 pip show -f 库名查看所有安装的库及其版本pip list查看需要升级有新版本可用的库pip list -o查看命令帮助pip help