0

I recently installed Python 3.7 on my Raspberry Pi 3. However, I don't know what happened during installation, but there were no packages that were added to pip.

I tried to recompile Python from source, including adding parameters like -enable-optimizations and -altinstall but no luck. I have not tried to uninstall Python 3.x because I think it's a bit confusing since it was installed from source, and there may programs dependent on Python 3.x as well.

Here's the output of pip3 list:

$ pip3 list
Package    Version
---------- -------
pip        19.0.3
setuptools 40.8.0
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=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

Quick note, I have libssl-dev already installed.

Andy Herbert
  • 67
  • 2
  • 10
  • Alright it appears that although Python 3.7 doesn't have a package in apt-get, python3-pip does. I used `sudo apt-get install python3-pip` and... still doesn't work, same errors. However I found the installation location of compiled Python and I have 3 different 3.x versions. I'll remove them and recompile... again... – Andy Herbert Sep 01 '19 at 13:58
  • 1
    Did you compile Python from source? If yes, the `ssl` module wasn't built, most probably because the build environment was misconfigured (it's not sufficient to install just the OpenSSL libs alone). – hoefling Sep 01 '19 at 16:21
  • @hoefling yes I did. Do you have any idea how it can get configured properly? – Andy Herbert Sep 01 '19 at 21:33
  • [This answer](https://stackoverflow.com/a/45534022/2650249) has a (more or less) complete list of build dependencies. However, latest Raspbian already offers Python 3.7 - I would rather fix whatever _there were no packages that were added to pip_ means, instead of building an unmanageable installation from source. – hoefling Sep 01 '19 at 21:51

0 Answers0