Last release trigger ModuleNotFoundError: No module named '_lzma'
See original GitHub issueSince the last release, our tensorflow/datasets tests are failing with E ModuleNotFoundError: No module named '_lzma'
. Triggered by:
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/fastavro/_read_py.py:12: in <module>
import lzma
Is it expected ? Is there a solution ?
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tensorflow_datasets/testing/dataset_builder_testing.py:305: in test_download_and_prepare_as_dataset
self._download_and_prepare_as_dataset(builder)
tensorflow_datasets/testing/dataset_builder_testing.py:365: in _download_and_prepare_as_dataset
import apache_beam as beam # pylint: disable=import-outside-toplevel,g-import-not-at-top
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/apache_beam/__init__.py:95: in <module>
from apache_beam import coders
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/apache_beam/coders/__init__.py:19: in <module>
from apache_beam.coders.coders import *
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/apache_beam/coders/coders.py:46: in <module>
from apache_beam.coders import coder_impl
apache_beam/coders/coder_impl.py:53: in init apache_beam.coders.coder_impl
???
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/fastavro/__init__.py:47: in <module>
import fastavro.read
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/fastavro/read.py:4: in <module>
from . import _read_py as _read # type: ignore
/home/kbuilder/virtualenv/tfds_env/lib/python3.6/site-packages/fastavro/_read_py.py:12: in <module>
import lzma
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""
__all__ = [
"CHECK_NONE", "CHECK_CRC32", "CHECK_CRC64", "CHECK_SHA256",
"CHECK_ID_MAX", "CHECK_UNKNOWN",
"FILTER_LZMA1", "FILTER_LZMA2", "FILTER_DELTA", "FILTER_X86", "FILTER_IA64",
"FILTER_ARM", "FILTER_ARMTHUMB", "FILTER_POWERPC", "FILTER_SPARC",
"FORMAT_AUTO", "FORMAT_XZ", "FORMAT_ALONE", "FORMAT_RAW",
"MF_HC3", "MF_HC4", "MF_BT2", "MF_BT3", "MF_BT4",
"MODE_FAST", "MODE_NORMAL", "PRESET_DEFAULT", "PRESET_EXTREME",
"LZMACompressor", "LZMADecompressor", "LZMAFile", "LZMAError",
"open", "compress", "decompress", "is_check_supported",
]
import builtins
import io
import os
> from _lzma import *
E ModuleNotFoundError: No module named '_lzma'
/home/kbuilder/.pyenv/versions/3.6.8/lib/python3.6/lzma.py:27: ModuleNotFoundError
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
No module named '_lzma' when building python using pyenv ...
The reason is that the module you're trying to use is implemented in C ... <module> from _lzma import * ModuleNotFoundError: No module...
Read more >ModuleNotFoundError: No module named '_lzma' - vision
I'm using python 3.7.10 with torch 1.81 and torchvision 0.9.1 in my machine and while importing dset from torchvision.dataset this error ...
Read more >Changelog — Python 3.11.1 documentation
The errno modules exposes the new error number. getpath.py now ignores PermissionError when it cannot open landmark files pybuilddir.txt and ...
Read more >ModuleNotFoundError: No module named 'pip' in Python
The Python "ModuleNotFoundError: No module named 'pip'" occurs when pip is not installed in our Python environment. To solve the error, install the...
Read more >Failure Exception: ModuleNotFoundError: No module named ...
Result: Failure Exception: ModuleNotFoundError: No module named 'requests', HTTP Trigger of Azure Function with Python 500. Hello community,.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Found solution, I am using 3.7.0, probably works with other versions:
Better solution though is to update machine image you’re and install the lzma library before installing pipenv.
Closing this. Installing
liblzma-dev
works (with the caveat this has to be installed before Pyenv). If anything, this should be a Pyenv bug. Thank you for your help.