【Python pandas】UserWarning: Could not import the lzma module. Your installed Python is incomplete
生活随笔
收集整理的這篇文章主要介紹了
【Python pandas】UserWarning: Could not import the lzma module. Your installed Python is incomplete
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在Linux使用python的pandas包時,出現了如下的報錯
UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result ina RuntimeError.warnings.warn(msg)解決方案
yum install xz-devel -y yum install python-backports-lzma -y pip3 install backports.lzma在文件 /usr/local/lib/python3.6/lzma.py line 27行 修改如下
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 。
總結
以上是生活随笔為你收集整理的【Python pandas】UserWarning: Could not import the lzma module. Your installed Python is incomplete的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Excel】日常记录
- 下一篇: 【VS Code】vue.js ESLi