-1

I have a file data.csv.xz. I want to extract the csv file but not manually. I find a way by using the package lzma. But when I pip install lama in python 3.8 in spyder, I got an error:

ERROR: Could not find a version that satisfies the requirement lzma (from versions: none) ERROR: No matching distribution found for lzma

what's wrong with the version 3.8 ? And, is there any other way to accomplish this task?

Benjamin
  • 93
  • 11
  • `lzma` is part of the Python standard library: https://docs.python.org/3/library/lzma.html#module-lzma So you should not need to install anything else and you can work with LZMA compressed (xz) files as is. – Ondrej K. Jan 02 '21 at 15:04

3 Answers3

2

lzma is part of the standard library of Python, so you won't find it in the PyPi indices.

To verify, simply fire up your python shell and just try :

>>> import lzma
>>>

It should work.

Amit Singh
  • 2,875
  • 14
  • 30
1

lzma is a part of standard library of Python. You dont need to install it, instead you can directly import it.

You can refer this https://docs.python.org/3/library/lzma.html#module-lzma

1

As said, you won't need to install lzma, as it is already in the pip standard library.

There's absolutely nothing wrong with your Python (hopefully).

new Q Open Wid
  • 2,225
  • 2
  • 18
  • 34