首先导入pandas会报出
/usr/local/lib/python3.6/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module.
Your installed Python is incomplete.
Attempting to use lzma compression will result in a RuntimeError.
warnings.warn(msg)
同时在使用pandas会报出
ModuleNotFoundError: No module named '_lzma'
网上的办法通过pip3来安装backports.lzma
python3 -m pip install backports.lzma
但是执行命令后报出 lzma.h文件缺失:
#############################################
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n9y4spd6/backports-lzma_3a42847536ba4e8fa04706acf1c9735d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n9y4spd6/backports-lzma_3a42847536ba4e