0
点赞
收藏
分享

微信扫一扫

Axios 中的文件上传(Upload File)方法

全栈学习笔记 2024-03-17 阅读 11

python问题:vscode切换环境,pip安装库网络错误

记录一下遇见的python问题。

vscode切换环境

在vscode上面的搜索框输入
在这里插入图片描述

> select interpreter

然后选择需要的环境。

pip安装库网络错误

用requirements.txt来安装需要的依赖包及其版本号,

pip install -r requirements.txt

出现:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/gymnasium/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/gymnasium/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/gymnasium/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/gymnasium/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/gymnasium/
Could not fetch URL https://pypi.org/simple/gymnasium/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/gymnasium/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping
ERROR: Could not find a version that satisfies the requirement gymnasium==0.28.1 (from versions: none)
ERROR: No matching distribution found for gymnasium==0.28.1
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping

解决:加镜像源

pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple
/ --trusted-host mirrors.aliyun.com
举报

相关推荐

0 条评论