-1

Hello i'm using a Raspberry pi running Raspian Jessie. I've tried updating the python version to 3.8.1 and it seems I'm having troubles running pip with it.

After i enter this line in terminal

python3.8 -m pip install Flask

I keep getting the following error

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting Flask WARNING: 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/flask/ WARNING: 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/flask/ WARNING: 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/flask/ WARNING: Retrying (Retry(total=1, 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/flask/ WARNING: 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/flask/ Could not fetch URL https://pypi.org/simple/flask/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=XXX): Max retries exceeded with url: /simple/flask/ (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 Flask (from versions: none) ERROR: No matching distribution found for Flask 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=XXX): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

I've tried reinstalling python. And following other suggestions online. i even tried to get the ssl package manually. all with no luck. can someone please help?

1 Answers1

2

You have to install the SSL headers and libraries before compiling Python.

Either install them using sudo apt install libssl-dev, or (cross) compile them from source.

When running the Python configure script, check the output before compiling. It'll tell you what packages are missing.

tttapa
  • 1,006
  • 6
  • 8