centos 编译安装 python3.7.3

编译之前需要给系统安装 sqlite3,否则会报 No module named _sqlite3

1
2
3
4
yum install sqlite-devel 
./configure --prefix=/opt/python/python-3.7.3 --enable-optimizations
make -j32
make install

make install 报错:

1
ModuleNotFoundError: No module named '_ctypes'

解决:

1
yum install libffi-devel -y