pandas包报错
File "/usr/local/lib/python3.7/site-packages/pandas/io/common.py", line 4, in <module>
import bz2
File "/usr/local/lib/python3.7/bz2.py", line 19, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
原因
# 安装的python缺少文件
cd /usr/local/lib/python3.7/lib-dynload/
ls
# 发现缺少_bz2.cpython-37m-x86_64-linux-gnu.so这个文件
# 从其他环境中将这个文件复制过来即可
chmod +x _bz2.cpython-37m-x86_64-linux-gnu.so