在青松服务器Kylin V10 sp1操作系统中,以源码方式安装完Python 3.9.2后,pip3工具无法使用。
执行过程中出现如下提示。
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
系统自带OpenSSL版本过低,不满足pip3工具的需求。
手动升级OpenSSL版本,可参考如下方式进行解决。
tar zxvf openssl-1.1.1m.tar.gz cd openssl-1.1.1m/
./config --prefix=/usr/local/openssl no-zlib make -j32 make install
mv /usr/bin/openssl /usr/bin/openssl.bak mv /usr/include/openssl/ /usr/include/openssl.bak
ln -s /usr/local/openssl/include/openssl/ /usr/include/openssl ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl