0

I am new to using Python packages, and I am trying to install a package called RSeQC into a Linux AWS instance. I started by running:

 sudo yum install python3-pip

then running:

 sudo yum install python3-devel

and Finally:

 sudo pip3 install RSeQC

However, I get the following long error:

 compilation terminated.
In file included from libBigWig/bwWrite.c:6:0:
libBigWig/bigWig.h:4:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNOCURL -DWITHNUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -IlibBigWig -I/usr/include/python3.7m -I/usr/local/lib64/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c pyBigWig.c -o build/temp.linux-x86_64-3.7/pyBigWig.o" failed with exit status 1

----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build- 
kv90ovvh/pyBigWig/setup.py';f=getattr(tokenize, 'open', open). 
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 
'exec'))" install --record /tmp/pip-smel45e_-record/install-record.txt --single-version- 
externally-managed --compile" failed with error code 1 in /tmp/pip-build-kv90ovvh/pyBigWig/

Would greatly appreciate any advice in debugging this as I am stumped. Thanks in advance!

A. Hartman
  • 223
  • 1
  • 4
  • 10
  • 1
    Have a look at https://stackoverflow.com/questions/36374267/how-to-fix-fatal-error-zlib-h-no-such-file-or-directory, it looks like the RSeQC python package depends on the `libz-dev` operating system library (the dev version which contains the headers required to link it). – David Waterworth Dec 05 '20 at 03:50
  • @DavidWaterworth Thanks for your reply! It looks like libz-dev is only an Ubuntu package. Do you know if there is an equivalent package for Linux? – A. Hartman Dec 05 '20 at 03:56
  • Ubuntu is a flavour of linux, but AWS supports several (https://aws.amazon.com/mp/linux/). Do you know which you're using - there will almost certainly be an equivalent? – David Waterworth Dec 05 '20 at 03:57
  • Actually, I'm guessing since you're using yum, that `yum install zlib-devel` might be what you need? – David Waterworth Dec 05 '20 at 03:59
  • @DavidWaterworth I am on the basic Amazon Linux – A. Hartman Dec 05 '20 at 03:59
  • 2
    Aha! After running it again (I must have mistyped something), installing zlib-devel fixed my problem! Thank you soooo much! – A. Hartman Dec 05 '20 at 04:02

0 Answers0