Entering edit mode
11.3 years ago
Nick
▴
290
I tried to install htseq-count on CentOS 5.9. I am getting errors:
[root@cltnfs HTSeq-0.5.4p3]# python setup.py build
/usr/lib64/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'requires'
warnings.warn(msg)
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.4
creating build/lib.linux-x86_64-2.4/HTSeq
copying HTSeq/__init__.py -> build/lib.linux-x86_64-2.4/HTSeq
copying HTSeq/_HTSeq_internal.py -> build/lib.linux-x86_64-2.4/HTSeq
copying HTSeq/StepVector.py -> build/lib.linux-x86_64-2.4/HTSeq
copying HTSeq/_version.py -> build/lib.linux-x86_64-2.4/HTSeq
creating build/lib.linux-x86_64-2.4/HTSeq/scripts
copying HTSeq/scripts/__init__.py -> build/lib.linux-x86_64-2.4/HTSeq/scripts
copying HTSeq/scripts/qa.py -> build/lib.linux-x86_64-2.4/HTSeq/scripts
copying HTSeq/scripts/count.py -> build/lib.linux-x86_64-2.4/HTSeq/scripts
running build_ext
building 'HTSeq._HTSeq' extension
creating build/temp.linux-x86_64-2.4
creating build/temp.linux-x86_64-2.4/src
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/lib64/python2.4/site-packages/numpy/core/include -I/usr/include/python2.4 -c src/_HTSeq.c -o build/temp.linux-x86_64-2.4/src/_HTSeq.o -w
gcc -pthread -shared build/temp.linux-x86_64-2.4/src/_HTSeq.o -o build/lib.linux-x86_64-2.4/HTSeq/_HTSeq.so
building 'HTSeq._StepVector' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c src/StepVector_wrap.cxx -o build/temp.linux-x86_64-2.4/src/StepVector_wrap.o -w
c++ -pthread -shared build/temp.linux-x86_64-2.4/src/StepVector_wrap.o -o build/lib.linux-x86_64-2.4/HTSeq/_StepVector.so
running build_scripts
creating build/scripts-2.4
copying and adjusting scripts/htseq-qa -> build/scripts-2.4
copying and adjusting scripts/htseq-count -> build/scripts-2.4
changing mode of build/scripts-2.4/htseq-qa from 644 to 755
changing mode of build/scripts-2.4/htseq-count from 644 to 755
[root@cltnfs HTSeq-0.5.4p3]# sudo python setup.py install
/usr/lib64/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'requires'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing HTSeq.egg-info/PKG-INFO
writing top-level names to HTSeq.egg-info/top_level.txt
writing dependency_links to HTSeq.egg-info/dependency_links.txt
reading manifest file 'HTSeq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'example_data'
no previously-included directories found matching 'test'
warning: no previously-included files found matching 'todo.txt'
writing manifest file 'HTSeq.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/HTSeq
copying build/lib.linux-x86_64-2.4/HTSeq/__init__.py -> build/bdist.linux-x86_64/egg/HTSeq
copying build/lib.linux-x86_64-2.4/HTSeq/_HTSeq_internal.py -> build/bdist.linux-x86_64/egg/HTSeq
copying build/lib.linux-x86_64-2.4/HTSeq/StepVector.py -> build/bdist.linux-x86_64/egg/HTSeq
copying build/lib.linux-x86_64-2.4/HTSeq/_version.py -> build/bdist.linux-x86_64/egg/HTSeq
creating build/bdist.linux-x86_64/egg/HTSeq/scripts
copying build/lib.linux-x86_64-2.4/HTSeq/scripts/__init__.py -> build/bdist.linux-x86_64/egg/HTSeq/scripts
copying build/lib.linux-x86_64-2.4/HTSeq/scripts/qa.py -> build/bdist.linux-x86_64/egg/HTSeq/scripts
copying build/lib.linux-x86_64-2.4/HTSeq/scripts/count.py -> build/bdist.linux-x86_64/egg/HTSeq/scripts
copying build/lib.linux-x86_64-2.4/HTSeq/_HTSeq.so -> build/bdist.linux-x86_64/egg/HTSeq
copying build/lib.linux-x86_64-2.4/HTSeq/_StepVector.so -> build/bdist.linux-x86_64/egg/HTSeq
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/__init__.py to __init__.pyc
File "build/bdist.linux-x86_64/egg/HTSeq/__init__.py", line 842
except ValueError as e:
^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/_HTSeq_internal.py to _HTSeq_internal.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/StepVector.py to StepVector.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/_version.py to _version.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/scripts/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/scripts/qa.py to qa.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/scripts/count.py to count.pyc
File "build/bdist.linux-x86_64/egg/HTSeq/scripts/count.py", line 187
rr = r[0] if r[0] is not None else r[1]
^
SyntaxError: invalid syntax
creating stub loader for HTSeq/_HTSeq.so
creating stub loader for HTSeq/_StepVector.so
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/_HTSeq.py to _HTSeq.pyc
byte-compiling build/bdist.linux-x86_64/egg/HTSeq/_StepVector.py to _StepVector.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-2.4/htseq-qa -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-2.4/htseq-count -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/htseq-qa to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/htseq-count to 755
writing HTSeq.egg-info/native_libs.txt
copying HTSeq.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying HTSeq.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying HTSeq.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying HTSeq.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
HTSeq.StepVector: module references __file__
creating dist
creating 'dist/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing HTSeq-0.5.4p3-py2.4-linux-x86_64.egg
creating /usr/lib64/python2.4/site-packages/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg
Extracting HTSeq-0.5.4p3-py2.4-linux-x86_64.egg to /usr/lib64/python2.4/site-packages
File "/usr/lib64/python2.4/site-packages/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg/HTSeq/__init__.py", line 842
except ValueError as e:
^
SyntaxError: invalid syntax
File "/usr/lib64/python2.4/site-packages/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg/HTSeq/scripts/count.py", line 187
rr = r[0] if r[0] is not None else r[1]
^
SyntaxError: invalid syntax
Adding HTSeq 0.5.4p3 to easy-install.pth file
Installing htseq-count script to /usr/bin
Installing htseq-qa script to /usr/bin
Installed /usr/lib64/python2.4/site-packages/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg
Processing dependencies for HTSeq==0.5.4p3
[root@cltnfs HTSeq-0.5.4p3]# cd ..
[root@cltnfs software]# python
Python 2.4.3 (#1, Jan 9 2013, 06:47:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import HTSeq
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/HTSeq-0.5.4p3-py2.4-linux-x86_64.egg/HTSeq/__init__.py", line 842
except ValueError as e:
^
Can anyone help?
You need to install numpy under the updated version of python. The first two errors that you listed above are what are causing the remaining errors.
Yep. In the installation docs, this is the next sentence after "you need at least version 2.5 of Python"...
Theoretically you should be able to get it all set up with its dependencies ready to go by running:
Or I guess in your case:
Thank you - it is a good advice but, unfortunately, it does not work in my case. The computer I am using does not have internet access so easy_install uses some sort of cached repository which lacks HTSeq:
Can you give me an advice how to proceed in these circumstances?
To be blunt, my advice would be to find a machine that has internet access...
I'm not sure how you were installing things before, but it all will be much more challenging than it needs to be if you force yourself to operate under these conditions. I don't understand how yum was working, or how you got the HTSeq source originally.
Thank you, dpryan79. I, actually, did install it before I got the above error by doing
Any other suggestion?
For some reason, the installation isn't working properly (I would presume that there's a PYTHON_PATH issue). Try directly running python26 and then import numpy to see if that works. It shouldn't, which means you need to either fix your PYTHON_PATH or reinstall numpy (you can go the more manual route of downloading the source code and doing python26 setup.py install).
Thank you for your advice. However, importing numpy in python26 works. Installation of htseq-count still doesn't.
Good, do you still get the same error (namely, that it can't find arrayobject.h and ufuncobject.h)? If so, then there's still something amiss with the PATH, though otherwise things appear to be working properly. Are the missing files actually located under /usr/lib64/python2.6/site-packages/numpy/core/include/numpy or /usr/include/python2.6/numpy? If not, you might just copy them there and retry the installation.
@dpryan79: Many thanks to you and to @matted for your kind help and advice. Our system administrator upgraded python and eliminated the network issue which was preventing me from accessing internet so it was no problem to do a normal installation of htseq-count. It's all fine now.