提前安装依赖包 (不安装,直接编译python,pip3 install 报错
SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl openssl-devel xz xz-devel libffi-devel ncurses ncurses-devel gcc gcc-c++ make
cd /opt/tools
wget https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tar.xz
tar xf Python-3.7.10.tar.xz
cd Python-3.7.10
./configure --prefix=/usr/local --enable-shared --enable-optimizations --with-ssl CFLAGS=-fPIC
make -j16 && make altinstall
cp libpython3.7m.so.1.0 /lib64/
python3.7 --version
which python3
unlink /usr/bin/python3
ln -s /usr/local/bin/python3.7 /usr/bin/python3
which python3
pip3 install ....