Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): - python

My error
Microsoft Windows [Version 10.0.22621.1105]
(c) Microsoft Corporation. All rights reserved.
C:\Users\donhu>conda --version
conda 23.1.0
C:\Users\donhu>pip --version
pip 21.2.4 from C:\ProgramData\Anaconda3\lib\site-packages\pip (python 3.9)
C:\Users\donhu>conda list -f pytorch
# packages in environment at C:\ProgramData\Anaconda3:
#
# Name Version Build Channel
C:\Users\donhu>conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
Retrieving notices: ...working... ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/r/notices.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))> for channel: defaults url: https://repo.anaconda.com/pkgs/r/notices.json
ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/msys2/notices.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))> for channel: defaults url: https://repo.anaconda.com/pkgs/msys2/notices.json
ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/notices.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))> for channel: defaults url: https://repo.anaconda.com/pkgs/main/notices.json
ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /nvidia/notices.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))> for channel: nvidia url: https://conda.anaconda.org/nvidia/notices.json
ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /pytorch/notices.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))> for channel: pytorch url: https://conda.anaconda.org/pytorch/notices.json
done
Collecting package metadata (current_repodata.json): /
failed
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.
Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /pytorch/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
C:\Users\donhu>
How to fix it?

Related

Problem pip installing sqlalchemy-access due to a "Could not fetch URL" error

I'm using Jupyter notebooks with 32-bit Python. I'm using pip 21.2.4 and Python 3.9. When I try to install sqlalchemy-access
pip install sqlalchemy-access
I get these errors,
Could not fetch URL https://pypi.org/simple/sqlalchemy-access/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/sqlalchemy-access/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - 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/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping
Note: you may need to restart the kernel to use updated packages.
One reccomendation I recieved was to try specifying the url using:
pip install --index-url=https://pypi.org/simple/sqlalchemy-access/
But then I just get another error
The current directory is invalid.
Any tips? Thanks!

Can't install any libraries in python due to some oserror

Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/cd/77/59df23681f4fd19b7cbbb5e92484d46ad587554f5d490f33ef907e456132/Flask-2.0.3-py3-none-any.whl (Caused by ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000285CC282940>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)'))
You are not connected to internet or you have slow connection or check if your behind a proxy or check this question or
Connection to pypi.org timed out

Unable to download or update anything from both anaconda and pip on mac os

Suddenly I'm unable to download or update anything from both anaconda and pip on mac os.
When I'm trying to download or update from anaconda I get the following error:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/soumith/osx-64/current_repodata.json
when trying to install something trough pip I get the following errors and warnings:
Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement certifi>=2017.4.17 (from requests->requests-html->facebook-scraper) (from versions: none)
ERROR: No matching distribution found for certifi>=2017.4.17 (from requests->requests-html->facebook-scraper)
WARNING: 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 connect to HTTPS URL because the SSL module is not available.")) - skipping
Can anyone pls help?
Thanks!

Python3.7 SSL error on raspberry pi3 pipinstall problem

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 connect to HTTPS URL because the SSL module is not available.")) - skipping

'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate

First Issue:
I am using a MackBook Pro to run a python3 program in PyCharm that connects to MySQL ,when I run the program I receive
ModuleNotFoundError: No module named 'mysql
for line 1 which is
import mysql.connector
What i have tried:
I tried to install mysql using pip
pip3 install mysql-connector-python
new issue:
while executing
pip install mysql-connector-python
received:
Could not fetch URL https://pypi.org/simple/mysql-connector-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/mysql-connector-python/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping
Could not find a version that satisfies the requirement mysql-connector-python (from versions: )
No matching distribution found for mysql-connector-python
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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping"

Categories