1

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 certifi according to https://github.com/pypa/pip/issues/4205

  • curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3 according 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 --user didn'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...

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 :

    1. I'm a bit afraid to mess with my actual settings
    1. Not sure what's : your_corp_username
    1. Not sure what's :
    1. Not sure which port I should use for : (as this is still new to me :( )

MANY THANKS

0 Answers0