Python developers ver. installation failed

Robert Jackiewicz rob at jackiewicz.ca
Fri Oct 22 10:28:13 EDT 2010


On Fri, 22 Oct 2010 16:09:15 +0200, Mateusz Koryciński wrote:

> Hi,
> 
> I need to install Cogent via python installation script. Unfortunately
> after typing in command line: "python setup.py build" or "python
> setup.py install" (I've tried with sudo as well) I receive something
> like that:
> 
> running install
> running build
> running build_py
> running build_ext
> building 'cogent.align._compare' extension gcc -pthread
> -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
> -fPIC
> -I/home/mateusz/Programy/Bioinfo/Cogent/include
> -I/usr/lib/python2.6/dist-packages/numpy/core/include
> -I/usr/include/python2.6 -c cogent/align/_compare.c -o
> build/temp.linux-i686-2.6/cogent/align/_compare.o -w
> cogent/align/_compare.c:4:20: error: Python.h: No such file or directory
> cogent/align/_compare.c:5:26: error: structmember.h: No such file or
> directory
> cogent/align/_compare.c:7:6: error: #error Python headers needed to
> compile C extensions, please install development version of Python.
> error: command 'gcc' failed with exit status 1
> 
> 
> So I'm trying to install Python 3.2 - after 'make install' command at
> the end I receive:
> 
> Removing
> /usr/local/lib/python3.2/lib-dynload/Python-3.2a3-py3.2.egg-info Writing
> /usr/local/lib/python3.2/lib-dynload/Python-3.2a3-py3.2.egg-info
> Creating directory /usr/local/share/man/man1 /usr/bin/install: can't
> create directory `/usr/local/share/man/man1': File exists
> make: *** [maninstall] Error 1
> 
> Of course I've tried as a root move (not copy) man directory from
> /usr/local/share/ to root /home but it have not helped at all.
> 
> Could somebody help me?
> 
> Will be very thankfully.
> 
> Best Regards,
> Mateusz
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
> <head>
> 
> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
> </head>
> <body text="#000000" bgcolor="#ffffff"> Hi,<br>
> <br>
> I need to install Cogent via python installation script. Unfortunately
> after typing in command line: "python setup.py build" or "python
> setup.py install" (I've tried with sudo as well) I receive something
> like that:<br>
> <font color="#000066"><br>
> running install<br>
> running build<br>
> running build_py<br>
> running build_ext<br>
> building 'cogent.align._compare' extension<br> gcc -pthread
> -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
> -fPIC
> -I/home/mateusz/Programy/Bioinfo/Cogent/include
> -I/usr/lib/python2.6/dist-packages/numpy/core/include
> -I/usr/include/python2.6 -c cogent/align/_compare.c -o
> build/temp.linux-i686-2.6/cogent/align/_compare.o -w<br>
> cogent/align/_compare.c:4:20: error: Python.h: No such file or
> directory<br> cogent/align/_compare.c:5:26: error: structmember.h: No
> such file or directory<br>
> cogent/align/_compare.c:7:6: error: #error Python headers needed to
> compile C extensions, please install development version of Python.<br>
> error: command 'gcc' failed with exit status 1</font><br> <br>
> <br>
> So I'm trying to install Python 3.2 - after 'make install' command at
> the end I receive:<br>
> <br>
> <font color="#000066">Removing
> /usr/local/lib/python3.2/lib-dynload/Python-3.2a3-py3.2.egg-info<br>
> Writing
> /usr/local/lib/python3.2/lib-dynload/Python-3.2a3-py3.2.egg-info<br>
> Creating directory /usr/local/share/man/man1<br> /usr/bin/install: can't
> create directory `/usr/local/share/man/man1': File exists<br>
> make: *** [maninstall] Error 1</font><br> <br>
> Of course I've tried as a root move (not copy) man directory from
> /usr/local/share/ to root /home but it have not helped at all.<br> <br>
> Could somebody help me?<br>
> <br>
> Will be very thankfully. <br>
> <pre class="moz-signature" cols="72">Best Regards, Mateusz
> </pre>
> </body>
> </html>

Hi Mateusz,

What distro are you using, assuming from the tb that your on linux or a 
POSIX OS?  Basically what is happening is that part of Cogent has some c 
code optimization and needs to be linked against python.  For the link to 
occur it needs the headers files and object/libraries.  The problem is 
that most distros don't install the headers files by default for python 
and most packages.  For debian/ubuntu just run 'apt get install python-
dev' and i believe for rhel/centos/fedora run 'yum install python-devel'.  
This should now let you compile cogent.

Cheers,
Rob




More information about the Python-list mailing list