CentOS7 python: ImportError: No module named bz2

surroundings:

CentOS7 
python3

Solution:

1, first installed by yum

yum install bzip2-devel

2, cd into the original file and then install Python clip

cd Python-3.5.6

3, recompiling

./configure
make
make install

If you encounter there

UserWarning: Could not import the lzma module. Your installed Python is incomplete

You may
Here Insert Picture Description
refer to
Stack Overflow

Published 131 original articles · won praise 81 · views 60000 +

Guess you like

Origin blog.csdn.net/weixin_43469047/article/details/104305350