You are not logged in.

#1 2020-10-26 11:09:05

serialschoenberg
Member
Registered: 2020-04-01
Posts: 12

[SOLVED] python 3.8.1 and ssl

Hello,

I fail to install the ssl module in Python3.8.1

I tried (stackoverlow https://stackoverflow.com/questions/490 … available)

-----------------------
cd .....Python-3.8.1
./configure --with-ssl
make
sudo make install
------------------------

I get:

----------------------------
.....
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=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
--------------------------

Any idea ?

Thanks

Last edited by serialschoenberg (2020-10-28 20:26:16)

Offline

#2 2020-10-26 12:30:35

twoion
ほやほや
Registered: 2015-08-10
Posts: 3,025

Re: [SOLVED] python 3.8.1 and ssl

I gather:

- you are using BunsenLabs and/or Debian Buster which comes with Python 3.7.x
- you have compiled and installed Python 3.8.1 manually
- you have trouble using the new distribution or getting it to compile against the right libraries

Without the full configure & build log it's impossible to say why that is exactly, but I suggest you check if you have the right development headers for SSL installed. A simple way to get everything would be "apt build-dep python3". Then remove the old build of py3.8.1, re-configure and re-build and re-install and check again.

You should see if the build config is effective by executing

import sysconfig
print(sysconfig.get_config_vars())

using your py3.8.1 build. You can also use this to debug your current broken build. It should include fields

'OPENSSL_INCLUDES':
'OPENSSL_LDFLAGS':
'OPENSSL_LIBS':
'PY_SSL_DEFAULT_CIPHERS':
'PY_SSL_DEFAULT_CIPHER_STRING':

If you want to make your life easier, I suggest using pyenv to build and manage multiple python versions https://github.com/pyenv/pyenv, or getting Anaconda instead: https://www.anaconda.com/products/individual.


Per aspera ad astra.

Offline

#3 2020-10-27 16:37:22

serialschoenberg
Member
Registered: 2020-04-01
Posts: 12

Re: [SOLVED] python 3.8.1 and ssl

Thanks for your answer. I hope it will be usefull for some others. In my case the solution was simpler. I took the following line from stackoverflow and at the end of this one can see a period.


sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev.

THis period is fatal for the installation.

Erasing it, I continued (sudo make etc.) without  issues.

Offline

Board footer

Powered by FluxBB