I\'m experimenting with the lzma module in Python 2.7.6 to see if I could create compressed files using the XZ format for a future project that will make use of it. My code
In my case (Ubuntu/Mint), in order to use the lzma module with Pyhton 2.7, I installed backports.lzma directly with pip (I have not used github), with sudo or root user:
pip2 install backports.lzma
FYI pip2 has the --user option that doesn't require superuser permissions and installs the module for the local user only, but I have not tested this.
First than performing the pip installation, you have also to install, with your package manager, one mandatory dependency: the library liblzma.
In my case the package names were liblzma5 andliblzma-dev but package names may differ between Linux distro/releases.
P.s: I also repeated the same operation with success with conda on a different Linux environment (Unknown cluster distro):
conda install backports
conda install backports.lzma --name pyEnvName
Hope useful