123456abcdef/cr-sc-dump

Help needed with pyliblzma

Closed this issue · 4 comments

Everything was fine when installing pillow, but I start encountering problems when I try to type "python -m pip install pyliblzma" into the terminal. All I got when I typed the command in was this:

Collecting pyliblzma

  Using cached pyliblzma-0.5.3.tar.bz2
Installing collected packages: pyliblzma
  Running setup.py install for pyliblzma ... error
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/f8/m568lsl97152p2_r2g2rscnw0000gp/T/pip-build-Jsii5J/pyliblzma/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/f8/m568lsl97152p2_r2g2rscnw0000gp/T/pip-XguBrV-record/install-record.txt --single-version-externally-managed --compile:
    /bin/sh: pkg-config: command not found
    /bin/sh: pkg-config: command not found
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-2.7
    copying liblzma.py -> build/lib.macosx-10.6-intel-2.7
    running build_ext
    building 'lzma' extension
    creating build/temp.macosx-10.6-intel-2.7
    creating build/temp.macosx-10.6-intel-2.7/src
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DVERSION="0.5.3" -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/liblzma.c -o build/temp.macosx-10.6-intel-2.7/src/liblzma.o -Wall -Wextra -pedantic -Wswitch-enum -Wswitch-default -std=gnu99
    In file included from src/liblzma.c:1:
    src/liblzma.h:24:10: fatal error: 'lzma.h' file not found
    #include <lzma.h>
             ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
    
    ----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/f8/m568lsl97152p2_r2g2rscnw0000gp/T/pip-build-Jsii5J/pyliblzma/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/f8/m568lsl97152p2_r2g2rscnw0000gp/T/pip-XguBrV-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/f8/m568lsl97152p2_r2g2rscnw0000gp/T/pip-build-Jsii5J/pyliblzma/

I am still new to using python so please tell me what is happening.

I am using Mac and python version 2.7.13

pyliblzma is just a wrapper around the lzma c implementation and it seems like you need to install the dependencies manually.
I'm using Macports as an package manager on my Mac where I had no problem installing it.
You could also try an older release https://github.com/123456abcdef/cr-sc-dump/blob/580f3a3a47af3d7333f82ef67acf78b1c6547a1d/dumpsc.py for Python3 which already comes with lzma. To use it you only need to install Pillow.

I committed an update switching to Python 3. Try the new version and the instructions. Please report back if you still have problems.

I can confirm the issue was resolved and script work as expected, thank you sop much I needed this

I may try other methods on my windows as well, but in the meantime thanks for the help!