environment
pyenv python =3.7.0
pandas = 1.3.2
OS = Ubuntu 16.04
report errors
There is a warning prompt after installing the pandas reference
Solution:
sudo apt-get install libbz2-dev
sudo apt-get install lzma
sudo apt-get install liblzma-dev
pip install backports.lzma
Find the file lzma.py and modify line 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 again.
No problem!
Similar Posts:
- [Solved] Python import pandastime Error: Could not import the lzma module
- [Solved] docker-compose:No module named ssl_match_hostname; ImportError: No module named shutil_get_te…
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1:
- Ubuntu18.04 (Python3.9) Error: ImportError: Cannot import name ‘sysconfig’ from ‘distutils’
- How to Solve pip3 ImportError: cannot import name ‘main’
- How to Solve Error: parent directory is world writable but not sticky
- Pyenv build failed solution
- Using pyenv causes the problem that python3 cannot import SQLite3
- The process of installing jupyter notebook on MAC
- Solution of import Cafe error reporting in Python command line