问题:
* On Debian/Ubuntu, you need to install Python development packages:
* apt-get install python3-dev
* apt-get install python-dev
* If you are building Python by yourself, rebuild with `--enable-shared` (or, `--enable-framework` on macOS)`
centOS7 : yum install python3-devel
yum install python3-devel
cd /python解压包
./configure --enable-optimizations --enable-shared --with-openssl=/usr/local/openssl-1.1.1 --with-openssl-rpath=auto
重新编译python 在原有编译语句中加入--enable-shared
编译后python,pip等命令会无法访问, 将编译的依赖库拷贝到系统库中
cd /usr/local/lib
cp libpython3.so libpython3.9.so.1.0 /usr/lib64/
找到 libpython3.so等文件的位置执行拷贝语句