環境:
CentOS7
python3
解決方法:
1、先通過yum安裝
yum install bzip2-devel
2、再cd 進入原來安裝Python的文件夾
cd Python-3.5.6
3、重新編譯即可
./configure
make
make install
還有如果遇到
UserWarning: Could not import the lzma module. Your installed Python is incomplete
可以
參考
Stack Overflow