python error: Could not import the lzma module. Your installed Python is incomplete.

2020. 4. 8. 10:47·Error code 모음/4. Python errors
반응형

위 에러는 보통 리눅스에서 파이썬을 설치하고 모듈을 import 할 때 나타나는 현상이다..

 

간단하게 lzma 에 대해서 기입하자면...

 

The Lempel–Ziv–Markov chain algorithm(LZMA) performs lossless data compression using a dictionary compression scheme featuring a higher compression ratio than other compression algorithms. Python’s lzma module consists of classes and convenience functions for compression and decompression of data with LZMA algorithm.

Lempel-Ziv-Markov chain 알고리즘으로.. 이 알고리즘은 다른 압축 알고리즘들보다 높은 압축 비율을 실행하는 딕셔너리 압축 스키마를 사용하는 데이터 손실율이 낮을 압축을 수행한다...... 

출처 : https://www.tutorialspoint.com/compression-using-the-lzma-algorithm-using-python-lzma

 

Compression using the LZMA algorithm using Python (lzma)

Compression using the LZMA algorithm using Python (lzma) The Lempel–Ziv–Markov chain algorithm(LZMA) performs lossless data compression using a dictionary compression scheme featuring a higher compression ratio than other compression algorithms. Python’s l

www.tutorialspoint.com

음..뭐 일단.. 대충 저렇게 해석은 되고.. 위키백과를 참고하면..

 

LZMA(Lempel–Ziv–Markov chain algorithm)는 데이터 압축에 쓰이는 알고리즘이다. 1998년 이후로 계속 개발 중이며 7-zip 압축 프로그램의 7z 형식에 쓰인다. 이 알고리즘은 LZ77과 어느 정도 비슷한 사전 압축 계획을 이용하며 일반적으로 bzip2보다 더 높을 만큼의 높은 압축률을 제공하며 최대 4 GiB의 가변 압축 사전 크기를 제공한다.

 

LZMA2는 비압축 데이터와 LZMA 데이터를 동시에 포함할 수 있는 단순 컨테이너 포맷으로, 각기 다른 여러 개의 LZMA 인코딩 변수가 포함될 수 있다. LZMA2는 임의 스케일링이 가능한 멀티스레드 방식의 압축 및 압축 해제, 그리고 부분적으로 압축이 불가능한 데이터의 효율적인 압축을 지원한다.

https://ko.wikipedia.org/wiki/LZMA

 

LZMA - 위키백과, 우리 모두의 백과사전

 

ko.wikipedia.org

파이썬에서는.. 모듈을 통해 모듈들을 압축하고 압축을 해제하는 것 같다.. 파일 설치에 있어서 중요한 역할?을 하는..놈 같은..,데... 리눅스에서 이게 설치가 안되면.. 파이썬 모듈을 설치했다고 하더라도, 모듈이 실행이 안되는 문제가 발생한다.. 한마디로 중요한놈...

 

이 에러가 발생했을 때는 lzma-dev 패키지를 설치해주어야 하는데

1. 우분투 

[root@localhost ~]# sudo apt-get install liblzma-dev

1. 센토스

[root@localhost ~]# yum install -y xz-devel

 

2. 그 다음 파이썬이 설치된 경로로 가서 아래 명령어 실행해주어 패키지 설치한 사실을 인지시키고 다시 컴파일해준다.

(나의 경우에는 /usr/local/python3.7.1 경로에 설치해주었으므로 이 쪽으로 이동한다)

[root@localhost ~] ./configure && make && make install

 

3. 문제가 없을 경우 아래와 같이 뜬다

자세한 사항은 아래 링크 참고

https://stackoverflow.com/questions/57743230/userwarning-could-not-import-the-lzma-module-your-installed-python-is-incomple

 

UserWarning: Could not import the lzma module. Your installed Python is incomplete

After Installing Google Cloud Bigquery Module, if I import the module into python code. I see this warning message. Happening to me in python 3.7.3 Virtualenv. Tried to reinstall GCP bigquery module

stackoverflow.com

 

반응형

'Error code 모음 > 4. Python errors' 카테고리의 다른 글

[python error] : _csv.reader' object is not subscriptable  (0) 2020.06.21
python error : list indices must be integers or slices, not str  (0) 2020.05.23
python error: do_this( ) takes 1 positional argument but 15 were given  (0) 2020.03.18
python error: The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable.  (0) 2020.03.17
python error L “TypeError: __str__ returned non-string” but still prints to output?  (0) 2020.03.07
'Error code 모음/4. Python errors' 카테고리의 다른 글
  • [python error] : _csv.reader' object is not subscriptable
  • python error : list indices must be integers or slices, not str
  • python error: do_this( ) takes 1 positional argument but 15 were given
  • python error: The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable.
쟈누
쟈누
Ad astra per aspera
    반응형
  • 쟈누
    쟈누의 기록공간
    쟈누
  • 전체
    오늘
    어제
    • 분류 전체보기 (444)
      • AWS (31)
        • Glue (4)
        • S3 (1)
      • 클라우드 (0)
      • Data Engineering (37)
        • GitHub (10)
        • NiFi (11)
        • Spark (10)
        • Snowflake (0)
        • 머신러닝, AI (6)
      • 언어 (118)
        • 데이터 베이스 (42)
        • JAVA (9)
        • Python (34)
        • Java Script (15)
        • Linux (18)
      • 프로젝트, 인강 그리고 책 (30)
        • Spotify Project (7)
        • RASA chatbot Project (9)
        • Naver shopping Project (6)
        • 빅데이터를 지탱하는 기술 (8)
      • OLD (56)
        • IT 용어 사전 (13)
        • Front End (12)
        • Back End (31)
      • Error code 모음 (165)
        • 1. SQL errors (17)
        • 2. Hadoop errors (20)
        • 3. Linux Errors (14)
        • 4. Python errors (33)
        • 5. JAVA, Spring errors (41)
        • 6. Jav Script errors (10)
        • 7. Dev Tools errors (9)
        • 8. Git errors (8)
        • 9. Jenkins Errors (4)
        • 10. airflow Errors (2)
        • 11. Aws errors (7)
      • 개인 (1)
        • 책 (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
    • 블로그 관리
    • 글쓰기
  • 링크

  • 공지사항

    • 간단한 블로그 소개
  • 인기 글

  • 태그

    설치
    Python
    리눅스
    SQL
    Git
    자바
    AWS
    파이썬
    python error
    install
    error
    node
    linux
    API
    MySQL
    java
    NiFi
    Spring
    json
    에러
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
쟈누
python error: Could not import the lzma module. Your installed Python is incomplete.
상단으로

티스토리툴바