I'm trying since a while now to install : flask-sqlalchemy and pyscopg2 because I bought an online course on Fullstack Development.
My settings are:
- MacOs Mojave version 10.14.6 
- Python -> Version = Python Python 3.7.7 
- Postgres installed -> version = postgres (PostgreSQL) 12.3 
Error I get with : pip3 install flask-sqlalchemy or pip3 install pyscopg2 :
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pyscopg2/ ERROR: Could not find a version that satisfies the requirement pyscopg2 (from versions: none) ERROR: No matching distribution found for pyscopg2
and
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask-sqlalchemy/ ERROR: Could not find a version that satisfies the requirement flask-sqlalchemy (from versions: none) ERROR: No matching distribution found for flask-sqlalchemy
So following : https://github.com/pypa/warehouse/issues/3826 I tried:
pip3 install --default-timeout=1000 flask-sqlalchemy
Then I get :
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)'))': /simple/flask-sqlalchemy/ Could not fetch URL https://pypi.org/simple/flask-sqlalchemy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/flask-sqlalchemy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)'))) - skipping ERROR: Could not find a version that satisfies the requirement flask-sqlalchemy (from versions: none) ERROR: No matching distribution found for flask-sqlalchemy
So I checked the following in Python3:
import ssl 
ssl.OPENSSL_VERSION
'OpenSSL 1.1.1g  21 Apr 2020'
ssl.PROTOCOL_TLSv1_2
 <_SSLMethod.PROTOCOL_TLSv1_2: 5>
Other potential solutions I tried and which unfortunately didn't work :
- brew uninstall openssl; brew install openssl
- uninstall and reinstall python3 
- pip3 install certifiaccording to https://github.com/pypa/pip/issues/4205
- curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3according to pip issue installing almost any library
- pip3 --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install flask-sqlalchemy --userdidn't work, and I read afterwards this isn't very secure to bypass like this...
So I really don't know what I should do, and installing packages with pip3 is supposed to be easy :) : - Please if someone could help, I don't know what I have to do more...
- Maybe linked Could not find a version that satisfies the requirement flask (from versions: ) No matching distribution found for flask they say to
set http_proxy=http://your_corp_username:password@<your_corp_proxy_host>:<port>
set https_proxy=https://your_corp_username:password@<your_corp_proxy_host>:<port>
But :
- I'm a bit afraid to mess with my actual settings
 
- Not sure what's : your_corp_username
 
- Not sure what's :
 
- Not sure which port I should use for : (as this is still new to me :( )
 
MANY THANKS
