Python Forum
Pip install problem with Python 3.7, not 3.9
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pip install problem with Python 3.7, not 3.9
#1
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:
1) on Python 3.7 is working smoothly without any issue
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)
2) on Python 3.9 the following error is obtained:

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
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 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
Reply
#2
If Python 3.9 was compiled, you need libopenssl.

https://github.com/pyenv/pyenv/wiki#trou...oting--faq

sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#3
(Aug-02-2023, 08:45 AM)DeaD_EyE Wrote: If Python 3.9 was compiled, you need libopenssl.

https://github.com/pyenv/pyenv/wiki#trou...oting--faq

sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Hi DeaD_EyE,
I have just tried and the whole process for the three commands require some minutes.
No error appeared.
I do either confirm you that Python3.9 can run on the device.
Still the same issue is being shown up when using pip for Python3.9.
Anything I may have done wrongly?
Any other solution to be applied?

I can attach the result of the traceback of the three command if needed.

TY

Mark
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem install somewhere package akbarza 1 495 Dec-27-2023, 01:25 PM
Last Post: Gribouillis
  Problem trying to install UniCurses on Python-3.12 / W10-64 rdmaia 5 1,200 Aug-02-2023, 06:24 PM
Last Post: DeaD_EyE
  ibm_db install problem mesi1000 1 3,182 Oct-27-2022, 06:54 PM
Last Post: snippsat
  install problem 3.9.1 ajvperth 0 1,638 Jan-04-2021, 03:17 PM
Last Post: ajvperth
  Problem: Restart kernel onPydev console when trying to install a python package poppy2020 1 7,725 Nov-25-2020, 06:13 PM
Last Post: Larz60+
  PIP install problem samuelbachorik 1 4,137 Jul-31-2020, 01:33 AM
Last Post: Larz60+
  OpenCV Install Problem siansoft 2 3,500 Mar-19-2017, 11:03 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020