Sublime Forum

Can't import lzma

#1
>>> import lzma
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "./python3.3/lzma.py", line 26, in <module>
ImportError: No module named '_lzma'

Isn’t lzma included by default in Python 3.3? Was it stripped out of the ST3 embedded python?

0 Likes

#2

We do no include it in our build of Python. Your best bet is to compile it and submit it to the default Package Control channel as a dependency.

0 Likes

#3

Reviving the old thread but was curious about availability in sublime text 4, as it seems to be loadable from the console but not from plugins

0 Likes

#4

lzma is included in the Python 3.8 environment. See https://www.sublimetext.com/docs/api_environments.html for info about how to run your plugin on Python 3.8.

1 Like