环境
pyenv python =3.7.0
pandas = 1.3.2
OS = Ubuntu 16.04
报错
安装pandas引用后有warning提示
![](https://img2020.cnblogs.com/blog/1172315/202109/1172315-20210914225146137-324597142.png)
解决
sudo apt-get install libbz2-dev
sudo apt-get install lzma
sudo apt-get install liblzma-dev # 最重要的 编译了好几次 没有这个真不行。很老的包了 2012年的
pip install backports.lzma
找到文件lzma.py,修改27行
find / -name lzma.py
/root/.pyenv/versions/3.7.3/lib/python3.7/lzma.py
try:
from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties
except ImportError:
from backports.lzma import *
from backports.lzma import _encode_filter_properties, _decode_filter_properties
再次引入import pandas 无问题了