Python이 업그레이드된 OpenSSL 버전을 인식하지 못하는 이유는 무엇입니까?

Python이 업그레이드된 OpenSSL 버전을 인식하지 못하는 이유는 무엇입니까?

CentOS 7에 Python 3.7을 설치하고 Python에서 사용하는 SSL 패키지를 업그레이드하려고 합니다. openssl을 업그레이드했는데 이 버전이 있습니다...

(venv) [rails@server Python-3.7.0]$ openssl version -a
OpenSSL 1.1.1g  21 Apr 2020
built on: Thu May  7 19:18:59 2020 UTC
platform: linux-x86_64
options:  bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr) 
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DZLIB -DNDEBUG
OPENSSLDIR: "/usr/local/openssl"
ENGINESDIR: "/usr/local/openssl/lib/engines-1.1"
Seeding source: os-specific

Python 3.7 소스 코드를 다운로드하고 Modules/Setup.dist를 다음과 같이 편집했습니다.

# Socket module helper for socket(2)
_socket socketmodule.c

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/openssl
_ssl _ssl.c \
        -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
        -L$(SSL)/lib -lssl -lcrypto

이렇게 구성하고 설치했습니다

./configure CPPFLAGS="-I/usr/local/openssl/include" LDFLAGS="-L/usr/local/openssl/lib"
make
make install

make가 성공적으로 완료된 것 같지만 다음과 같은 경고가 표시됩니다.

...
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_lzma                 _tkinter              _uuid              
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           

running build_scripts
copying and adjusting /tmp/Python-3.7.0/Tools/scripts/pydoc3 -> build/scripts-3.7
copying and adjusting /tmp/Python-3.7.0/Tools/scripts/idle3 -> build/scripts-3.7
copying and adjusting /tmp/Python-3.7.0/Tools/scripts/2to3 -> build/scripts-3.7
copying and adjusting /tmp/Python-3.7.0/Tools/scripts/pyvenv -> build/scripts-3.7
changing mode of build/scripts-3.7/pydoc3 from 664 to 775
changing mode of build/scripts-3.7/idle3 from 664 to 775
changing mode of build/scripts-3.7/2to3 from 664 to 775
changing mode of build/scripts-3.7/pyvenv from 664 to 775
renaming build/scripts-3.7/pydoc3 to build/scripts-3.7/pydoc3.7
renaming build/scripts-3.7/idle3 to build/scripts-3.7/idle3.7
renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7
renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7
(venv) [rails@server Python-3.7.0]$ 

그런데 Python을 실행하면 여전히 이전 버전이 표시됩니다.

[rails@server Python-3.7.0]$ python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 1.0.2k-fips  26 Jan 2017

Python이 올바른 openssl 패키지를 인식하도록 하려면 또 무엇을 해야 합니까?

관련 정보