import pandas as pd

在使用pandas时报Could not import the lzma module解决方法:

1、安装了 backports.lzma

pip3 install backports.lzma

 

2、把lzma.py第27行左右的代码改为如下:

Users/apple/.pyenv/versions/3.7.4/lib/lzma.py

 

from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties
改成:
from backports.lzma import *
from backports.lzma import _encode_filter_properties, _decode_filter_properties 

  

 

相关文章:

  • 2022-01-14
  • 2022-12-23
  • 2021-07-30
  • 2022-02-09
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2022-12-23
  • 2021-06-19
  • 2022-02-25
  • 2021-08-20
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案