Skip to content

### from _lzma import * ModuleNotFoundError: No module named '_lzma' :: Solution #54312

@defyingdemonprogram

Description

@defyingdemonprogram
          ### Solution

frist

yum install xz-devel
yum install python-backports-lzma
pip install backports.lzma

second

cd /usr/local/lib/python3.8
vi lzma.py 

finally
modify about 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

it‘s work!I had to search for hours to get this problem to be solved.

Credit: Yolo5 issues

Originally posted by @realsanjeev in #27532 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions