-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named '_lzma' #27532
Comments
Hmm did you have any issues when installing Python via pyenv? lzma is part of the standard library so surprised to see that in the backtrace |
Thanks, I've figure'd it out. I removed 3.7.1 with |
no problem. glad you got it sorted. |
Same issue on macOS. My steps were:
Quick test to make sure it worked:
Install all the packages you saved to latestPackages.txt |
@tvanyo Thanks for the suggestion. Can someone comment on whether the same problem happens on Windows if you have installed Python via |
Actually for Ubuntu 18.04 installing |
For the record, I have hit pretty much all issues mentioned above on a mac mini M1. Even with xz installed it wasn't picking it up. I solved it via: brew install xz # To pick up liblzma
prefix=$(brew --prefix)
export LDFLAGS="-L$prefix/opt/xz/lib $LDFLAGS"
export CPPFLAGS="-I$prefix/opt/xz/include $CPPFLAGS"
export PKG_CONFIG_PATH="$prefix/opt/xz/lib/pkgconfig:$PKG_CONFIG_PATH"
# YOU CANNOT HAVE THE GNUBINS in your PATH when you run this
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.2
python3 -c "import lzma" # should work and not throw "cannot import _lzma" |
That's what solved it for me
|
Solutionfrist
second
finally
it‘s work!I had to search for hours to get this problem to be solved. Credit: Yolo5 issues |
Code Sample, a copy-pastable example if possible
Problem description
Can't import last
pandas
release (0.25.0).I've installed
pandas
usingpipenv
:Test import:
Downgrading to 0.24.2 fixes this issue.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-55-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: ru_RU.UTF-8
LOCALE: ru_RU.UTF-8
pandas: 0.25.0
pytest: None
pip: 19.1.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.4
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
None
The text was updated successfully, but these errors were encountered: