运动类网站,汕头代理注册公司,企业网站建设需要提供什么材料,网页qq邮箱登录更换镜像源 一. 现象pycharm使用 pip install xxx安装包时#xff0c;一直报错#xff1a; 二. 原因#xff1a;三. 解决办法#xff1a;一. 临时使用二. 永久更改三. 永久更改1. Windowswindows环境下Windows#xff08;示例win10#xff09; 2. Linux or Mac3. Pycharm… 更换镜像源 一. 现象pycharm使用 pip install xxx安装包时一直报错 二. 原因三. 解决办法一. 临时使用二. 永久更改三. 永久更改1. Windowswindows环境下Windows示例win10 2. Linux or Mac3. Pycharm中修改库下载源 一. 现象
pycharm使用 pip install xxx安装包时一直报错
WARNING: Retrying (Retry(total4, connectNone, readNone, redirectNone, statusNo
ne)) after connection broken by SSLError(SSLEOFError(8, EOF occurred in violationof protocol (_ssl.c:1123))): /simple/flask/
WARNING: Retrying (Retry(total0, connectNone, readNone, redirectNone, statusNo
ne)) after connection broken by SSLError(SSLEOFError(8, EOF occurred in violationof protocol (_ssl.c:1123))): /simple/flask/
ERROR: Could not find a version that satisfies the requirement xxx (from versions
: none)
ERROR: No matching distribution found for xxx
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming th
e ssl certificate: HTTPSConnectionPool(hostpypi.org, port443): Max retries exce
eded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, EOF occurred in vio
lation of protocol (_ssl.c:1123)))) - skipping二. 原因
pypi.python.org在国内被墙了无法从python官网url下载。
三. 解决办法
一. 临时使用
更改为国内的镜像源xxx为安装的包
pip install xxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx豆瓣(douban) http://pypi.douban.com/simple/ 阿里云 http://mirrors.aliyun.com/pypi/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/ 华为云https://repo.huaweicloud.com/repository/pypi/simple
注还尝试了一种方法是加上–trusted-host
执行 pip install xxx -i https://pypi.org/simple --trusted-host pypi.org 但是仍然报错
这次应该url对了但是还是一直WARNING
二. 永久更改
在python的命令提示符中运行以下语句该条语句将pip的下载源永久更改为某个镜像站这里以清华大学开源镜像站为例
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/三. 永久更改
1. Windows
windows环境下
在用户目录中创建一个文件夹该文件夹的命名为pip在该pip文件夹中新建一个文件pip.inipip.ini的内容如下完整路径C:\Users\用户名\pip\pip.ini
[global]
index-urlhttps://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-hostpypi.tuna.tsinghua.edu.cn
disable-pip-version-check true
timeout 600Windows示例win10
1、文件管理器文件路径地址栏敲%APPDATA% 回车快速进入 C:\Users\电脑用户\AppData\Roaming 文件夹中 2、新建 pip 文件夹并在文件夹中新建 pip.ini 配置文件 3、新增 pip.ini 配置文件内容
[global]
index-url http://pypi.douban.com/simple
[install]
use-mirrors true
mirrors http://pypi.douban.com/simple/
trusted-host pypi.douban.com2. Linux or Mac
首先在用户目录下新建.pip文件夹
mkdir ~/.pip在该目录下新建配置文件pip.conf输入如下内容保存
[global]
index-url https://pypi.tuna.tsinghua.edu.cn/simple3. Pycharm中修改库下载源
在setting中按如下路径打开包下载 点击Manage Respositories点击添加国内源路径即可 破壳的小企鹅
python更换国内镜像源三种实用方法
SevenBerry
python安装pip install报错Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirm
牧竹子
Python环境安装并永久配置镜像源