Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global name 'lzma' is not defined #70

Open
welchr opened this issue Feb 25, 2019 · 1 comment
Open

global name 'lzma' is not defined #70

welchr opened this issue Feb 25, 2019 · 1 comment

Comments

@welchr
Copy link
Contributor

welchr commented Feb 25, 2019

If I use cget installed in a python 2.7 virtualenv, and then install a package that is contained in a .xz archive, it will fail with:

Downloading http://sourceforge.net/projects/arma/files/armadillo-9.200.7.tar.xz
  [######################################################################]  100%
Extracting archive /home/user/scratch/cget_test/cget/cget/build/tmp-9737299f14b44942b74e65ee781e74c4/armadillo-9.200.7.tar.xz ...
Unexpected error: <type 'exceptions.NameError'>
global name 'lzma' is not defined
Failed to build package .

Test case:

#!/bin/bash
virtualenv -p python2 venv &&
  source venv/bin/activate &&
  pip install cget &&
  echo 'armadillo,http://sourceforge.net/projects/arma/files/armadillo-9.200.7.tar.xz' >> requirements.txt &&
  cget install .

It seems to work just fine in a python 3 environment, however.

@pfultz2
Copy link
Owner

pfultz2 commented Feb 27, 2019

Python 2 doesn't support lzma out of the box, but you can install backports.lzma(with pip install backports.lzma) to get support in python 2.

I should add a note about this in the installation section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants