jd-boyd/python-lzo

not able to pip install python-lzo to a python vm on linux (centos7)

d3d1y opened this issue · 3 comments

d3d1y commented

I am not able to pip install python-lzo to a python vm on linux (centos7). I saw that there was a related issue previously, but that there was also a request that a new issue be opened if anyone else had this problem.

(AssemblyPython3.6.3-centos7) [miRNA-profiling@dbrooks04: git_repositories]$ pip install python-lzo
Collecting python-lzo
Using cached https://files.pythonhosted.org/packages/bc/ac/cec925b9367b8f7f18a606d462fe17069fb13b0fd2fe7df0c324a83a8018/python-lzo-1.11.tar.gz
Installing collected packages: python-lzo
Running setup.py install for python-lzo ... error
Complete output from command /home/dbrooks/git_repositories/AssemblyPython3.6.3-centos7/bin/python3.6 -u -c "import setuptools, tokenize;file='/var/tmp/pip-install-z4h_d5d/python-lzo/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/tmp/pip-record-ba9ihqo/install-record.txt --single-version-externally-managed --compile --install-headers /home/dbrooks/git_repositories/AssemblyPython3.6.3-centos7/include/site/python3.6/python-lzo:
/gsc/software/linux-x86_64-centos7/python-3.6.3/lib/python3.6/distutils/dist.py:245: UserWarning: 'licence' distribution option is deprecated; use 'license'
warnings.warn(msg)
running install
running build
running build_ext
building 'lzo' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/lzo -I/home/dbrooks/git_repositories/AssemblyPython3.6.3-centos7/include -I/gsc/software/linux-x86_64-centos7/python-3.6.3/include/python3.6m -c lzomodule.c -o build/temp.linux-x86_64-3.6/lzomodule.o
lzomodule.c:35:19: fatal error: lzo1x.h: No such file or directory
#include <lzo1x.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Command

"/home/dbrooks/git_repositories/AssemblyPython3.6.3-centos7/bin/python3.6 -u -c "import setuptools, tokenize;file='/var/tmp/pip-install-z4h_d5d/python-lzo/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/tmp/pip-record-ba9ihqo/install-record.txt --single-version-externally-managed --compile --install-headers /home/dbrooks/git_repositories/AssemblyPython3.6.3-centos7/include/site/python3.6/python-lzo" failed with error code 1 in /var/tmp/pip-install-_z4h_d5d/python-lzo/

This error most likely means that you don't have an appropriate version of lzo installed on your Centos VM. Does it have installed the lzo-devel RPM? If installing that fixes, perhaps you would be willing to make a PR to add a Centos section to the main README.md file? Alternatively, just let me know the results and I'll add such a section.

d3d1y commented

Thanks. Will do.

d3d1y commented

So, I'm not using a Centos VM, and I'm working on a linux system where I don't have root. So I had lzo installed by the systems people. After that, I was able to pip install python-lzo without any problem at all.