简体   繁体   中英

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'

Got this error

pip is configured with locations that require TLS/SSL. however the ssl module in Python is not available. 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 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 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

I updated Pycharm. installed OpenSSL.

Tried changing the URL in settings > python interpreter > + sign > manage respirators, but couldn't find the 'manage respirators' option.

What should I do? TIA

I came across a similar problem and the following trick worked.

Activate your base conda environment first. After that activate your project's python environment. Then go ahead and install openpyxl using pip install command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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