jamadden / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 2 forks source link

install fails on fedora 17 #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pip-python install regex

2.
3.

What is the expected output? What do you see instead?
Successfully installed regex

---
Fatal Error: Python.h: No such file or directory

What version of the product are you using? On what operating system?
Downloading regex-2013-03-11.tar.gz 
Fedora 17 with Python 2.7

Please provide any additional information below.

pip-python install regex
Downloading/unpacking regex
  Downloading regex-2013-03-11.tar.gz (1.1Mb): 1.1Mb 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 --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -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 -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: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/pwc/build/regex/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Xpw7rr-record/install-record.txt:
    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 --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -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 -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: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import 
setuptools;__file__='/home/pwc/build/regex/setup.py';exec(compile(open(__file__)
.read().replace('\r\n', '\n'), __file__, 'exec'))" install 
--single-version-externally-managed --record 
/tmp/pip-Xpw7rr-record/install-record.txt failed with error code 1
Storing complete log in /root/.pip/pip.log

Original issue reported on code.google.com by pcS...@gmail.com on 2 Apr 2013 at 4:31

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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