简体   繁体   English

在 WIndows 10 上的 Pycharm 中安装 Openpyxl package 时出现 TLS/SSL 错误

[英]TLS/SSL error while installing Openpyxl package in Pycharm on WIndows 10

Tried installing openpyxl from pypi.org in Pycharm's terminal by copy-pasting this code "pip install openpyxl'尝试通过复制粘贴此代码“pip install openpyxl”在 Pycharm 的终端中从 pypi.org 安装 openpyxl

Got this error收到此错误

pip is configured with locations that require TLS/SSL. pip 配置有需要 TLS/SSL 的位置。 however the ssl module in Python is not available.但是 Python 中的 ssl 模块不可用。 Collecting openpyxl Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after c Collecting openpyxl Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available. ")': /simple/openpyxl/ 重试 (Retry(total=3, connect=None, read=None, redirect=None, status=None)) 连接被 'SSLError("Can't connect to HTTPS ZE6B391A8D2C4D45902A23A8B6585703 becauseD 'SSLError("Can 't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after c onnection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Could not fetch URL https://pypi.org/simple/openpyxl/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/openpyxl/ (Caused by SSLError ("Can't connect to HTTPS URL because the SSL module onnection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Retrying (Retry(total=0, connect=None, read=None, redirect=None , status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openpyxl/ Could not fetch URL https://pypi.org/ simple/openpyxl/ :确认 ssl 证书时出现问题:HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/openpyxl/到 HTTPS URL 因为 SSL 模块is not available.")) - skipping Could not find a version that satisfies the requirement openpyxl (from versions: ) No matching distribution found for openpyxl pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. is not available.")) - skipping Could not find a version that satisfies the requirement openpyxl (from versions: ) No matching distribution found for openpyxl pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available . 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("Can't conn ect to HTTPS URL because the SSL module is not available.")) - skipping 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/(由 SSLError 引起(“无法连接到 HTTPS URL,因为 SSL 模块不可用)-跳过。”)

I updated Pycharm.我更新了 Pycharm。 installed OpenSSL.安装 OpenSSL。

Tried changing the URL in settings > python interpreter > + sign > manage respirators, but couldn't find the 'manage respirators' option.尝试在设置 > python 解释器 > + 符号 > 管理呼吸器中更改 URL,但找不到“管理呼吸器”选项。

What should I do?我应该怎么办? TIA TIA

I came across a similar problem and the following trick worked.我遇到了类似的问题,以下技巧奏效了。

Activate your base conda environment first.首先激活您的基本 conda 环境。 After that activate your project's python environment.之后激活项目的 python 环境。 Then go ahead and install openpyxl using pip install command.然后 go 提前并使用 pip 安装命令安装 openpyxl。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM