Open GoogleCodeExporter opened 9 years ago
The Python.h file is in <python folder>/include, so gcc needs something like
"-I<python_folder>/include" to be added to its command line, but I don't know
how to do that.
Original comment by re...@mrabarnett.plus.com
on 2 Apr 2013 at 4:22
Still current in fedora 20, 3.13.6-200.fc20.x86_64 #1 SMP Fri Mar 7 17:02:28
UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ pip install --user regex
Downloading/unpacking regex
Downloading regex-2014.02.19.tar.gz (1.3MB): 1.3MB downloaded
Running setup.py egg_info for package regex
Installing collected packages: regex
Running setup.py install for regex
building '_regex' extension
gcc -pthread -fno-strict-aliasing -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 -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 -I/usr/include/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
Python2/_regex.c:46:20: fatal error: Python.h: File o directory non esistente
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_federico/regex/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-k4bOOZ-record/install-record.txt --single-version-externally-managed --user:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
gcc -pthread -fno-strict-aliasing -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 -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 -I/usr/include/python2.7 -c
Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
Python2/_regex.c:46:20: fatal error: Python.h: File o directory non esistente
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import
setuptools;__file__='/tmp/pip_build_federico/regex/setup.py';exec(compile(open(_
_file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record
/tmp/pip-k4bOOZ-record/install-record.txt --single-version-externally-managed
--user failed with error code 1 in /tmp/pip_build_federico/regex
Storing complete log in /home/federico/.pip/pip.log
Original comment by nemow...@gmail.com
on 26 Mar 2014 at 10:02
Actually, this is not a bug, or not in fedora 20: you just need to install the
dependency,
$ sudo yum install python-devel
and all is fine (a common incident:
http://derkan.blogspot.it/2012/06/pythonh-no-such-file-or-directory.html ).
If you could update the README, all the better.
Original comment by nemow...@gmail.com
on 26 Mar 2014 at 10:24
Original issue reported on code.google.com by
pcS...@gmail.com
on 2 Apr 2013 at 4:31