赞
踩
[root@10-9-88-115 project]# python test.py
/usr/local/python3/lib/python3.7/site-packages/pandas/compat/__init__.py:124: 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)
解决办法:
一, 在LINUX安装支持包
- yum install xz-devel
- yum install python-backports-lzma
- pip install backports.lzma
二,进入lzma配置文件 cd /usr/local/python3/lib/python3.7/ ,运行 vi lzma.py
修改一下( 加入try : except )
- 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
完成!
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。