setup-python
setup-python copied to clipboard
Pip install problem with Python 3.7, not 3.9
Hi,
I have a Raspberry PI in OS Raspbian GNU/Linux v 10. Debian version is 10.13 Till some days ago I used Python 2.7 without problem. I had to update to have a version compatible with a GITHUB package. For some reason (obviously caused by me) I installed either the 3.7 as well as the 3.9. From that moment, when i Try to install a package with the command PIP install:
- on Python 3.7 is working smoothly without any issue
Extract Begin
pi@raspberrypi:~ $ python -m pip install **** Defaulting to user installation because normal site-packages is not writeable ... Requirement already satisfied: rtp in /usr/local/lib/python3.7/dist-packages (from ****) (0.1.8)
Extract End
- on Python 3.9 the following error is obtained:
Extract Begin
pi@raspberrypi:~ $ python3.9 -m pip install **** Defaulting to user installation because normal site-packages is not writeable WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 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/****/ ..... 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 Could not fetch URL https://www.piwheels.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='www.piwheels.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
Extract End
Following the warning there are a lot of other attempts and other errors/warning occuring.
Found over the internet this is clearly an error with the SSL certificate (also found some specific in here https://github.com/actions/setup-python/issues/93 but was not able to solve it by the way) and tried to solve it, but since I have created a couple of years ago a self renewal certification for SSL (free) I am afraid in touching and modifying things without being sure. I am either confident this is something with PIP being corrupted after my operation only for the new Python so probably just some register or link to be fixed. In case the problem lies completely in PIP installation I shall have the same issue also on the 3.7 (and 2.7 which still works properly). Any idea how to safely solve the situation?
Thanks,
Mark
Hello, @anmabi1984 ! Thank you for reporting this issue, we will investigate it and see what the problem could be :)
@anmabi1984, you've said you're using a Raspberry Pi, and that you've installed Python 3.9, which suggests that this isn't related to actions/setup-python
project. The actions/setup-python
project is used to install Python in GitHub's Actions environment (GitHub Actions run tests in the cloud for software developers).
If possible, you might upgrade to Raspbian Bullseye (released in 2021) or Raspbian Bookworm (due out "soon"), which will include newer versions of Python. It's also possible that you could use pyenv to install Python versions (that's what I use on my computer).
@dusan-trickovic / @dmitry-shibanov, I recommend closing this issue.
Hello @kurtmckee. Thank you for your help. For now we'll wait for the response and after that we'll decide to close it.