python / cpython

The Python programming language
https://www.python.org
Other
63.11k stars 30.22k forks source link

Notify people during configuration step that they won't be able to use pip if they have installed latest python from source and libssl is missing on their system #116461

Open Agent-Hellboy opened 7 months ago

Agent-Hellboy commented 7 months ago

Bug description:

I installed python from source and i am not able to use pip because it uses ssl and my system is missing libssl , i got to know that it is missing by looking at config.log

One of my friend got confused by the error message why pip suddenly starts throwing this error ?

➜  cpython git:(main) ✗ python3 -m pip install flask
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.
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/

current message from make

The following modules are *disabled* in configure script:
_sqlite3                                                                   

The necessary bits to build these optional modules were not found:
_bz2                      _ctypes                   _ctypes_test           
_curses                   _curses_panel             _dbm                   
_gdbm                     _hashlib                  _lzma                  
_ssl                      _tkinter                  _uuid                  
readline                                                                   
To find the necessary bits, look in configure.ac and config.log.

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

Checked 111 modules (33 built-in, 63 shared, 1 n/a on linux-x86_64, 1 disabled, 13 missing, 0 failed on import)

it's saying python require Python requires a OpenSSL 1.1.1 or newer it is there, it should say we need libssl as _ssl is dependent on it

I got to know about this after checking the config.log file

configure:27790: checking for pkg-config
configure:27822: result: /usr/bin/pkg-config
configure:27869: checking for include/openssl/ssl.h in /usr/local/ssl
configure:27880: result: no
configure:27869: checking for include/openssl/ssl.h in /usr/lib/ssl
configure:27880: result: no
configure:27869: checking for include/openssl/ssl.h in /usr/ssl
configure:27880: result: no
configure:27869: checking for include/openssl/ssl.h in /usr/pkg
configure:27880: result: no
configure:27869: checking for include/openssl/ssl.h in /usr/local
configure:27880: result: no
configure:27869: checking for include/openssl/ssl.h in /usr
configure:27880: result: no

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

koubra-gaby commented 7 months ago

comment résoudre ce bug svp?