Install Python 3.10 from compiling source code under CentOS 7
...
817 sudo mkdir /usr/local/openssl11
818 cd /usr/local/openssl11
819 sudo ln -s /usr/lib64/openssl11 lib
820 sudo ln -s /usr/include/openssl11 include
...
900 cd Python-3.10.5/
901 ls
902 ./configure --enable-optimizations --with-openssl=/usr/local/openssl11
903 sudo make altinstall
or find and edit code about ssl, cotent is as follow.
902 vim Modules/Setup
OPENSSL=/usr/local/openssl11
_ssl _ssl.c \
-I$(OPENSSL)/include -L$(OPENSSL)/lib \
-lssl -lcrypto