Trouble building with local Python installation - Problem with Python.h

Hi,

I am trying to build latest wxPython on my old Fedora 22 with locally built Python 2.7.13 (original is 2.7.10).

I have the failed to locate by build.py, Python.h on /opt/misc/Python-2.7.13/Include/ and I tried to pass to it, with:
export INCLUDE=/opt/misc/Python-2.7.13/Include/

``

Still having the error:
Running command: build_py
Checking for /opt/misc/github/Phoenix/bin/waf-1.7.15-p1…
“/usr/local/bin/python2.7” /opt/misc/github/Phoenix/bin/waf-1.7.15-p1 --wx_config=/opt/misc/github/Phoenix/build/wxbld/wx-config --jobs=3 --gtk3 --python="/usr/local/bin/python2.7" --out=build/waf/2.7 configure build
Setting top to : /opt/misc/github/Phoenix
Setting out to : /opt/misc/github/Phoenix/build/waf/2.7
Checking for ‘gcc’ (c compiler) : /bin/gcc
Checking for ‘g++’ (c++ compiler) : /bin/g++
Checking for program python : /usr/local/bin/python2.7
Checking for python version : (2, 7, 13, ‘final’, 0)
Checking for library python2.7 in LIBDIR : not found
Checking for library python2.7 in python_LIBPL : not found
Checking for library python2.7 in $prefix/libs : not found
Checking for library python2.7m in LIBDIR : not found
Checking for library python2.7m in python_LIBPL : not found
Checking for library python2.7m in $prefix/libs : not found
Checking for library python27 in LIBDIR : not found
Checking for library python27 in python_LIBPL : not found
Checking for library python27 in $prefix/libs : not found
Checking for program /usr/local/bin/python2.7-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/local/bin/python2.7-config
Checking for header Python.h : :frowning:
Asking python-config for pyembed --cflags flags : yes
Asking python-config for pyembed --libs flags : yes
Asking python-config for pyembed --ldflags flags : yes
Getting pyembed flags from python-config : Could not build a python embedded interpreter
The configuration failed
(complete log in /opt/misc/github/Phoenix/build/waf/2.7/config.log)
Command '"/usr/local/bin/python2.7" /opt/misc/github/Phoenix/bin/waf-1.7.15-p1 --wx_config=/opt/misc/github/Phoenix/build/wxbld/wx-config --jobs=3 --gtk3 --python="/usr/local/bin/python2.7" --out=build/waf/2.7 configure build ’ failed with exit code 1.
Finished command: build_py (1.98s)
Finished command: build (27.129s)

``

Well it actually find Python.h, but it fails to build. I attach the complete log, if someone could help me here.

Thanks.

config.log (27.7 KB)

Hélio Guilherme wrote:

Hi,

I am trying to build latest wxPython on my old Fedora 22 with locally built Python 2.7.13 (original is 2.7.10).

I
have the failed to locate by build.py, Python.h on /opt/misc/Python-2.7.13/Include/ and I tried to pass to it, with:
export INCLUDE=/opt/misc/Python-2.7.13/Include/

``

Is Python actually installed at that location (with make install) or is that it’s build folder. If it is the install location and if you use that python executable when building (from your output below and the log
shows that you’re using /usr/local/bin/python2.7) then it should automatically locate the include folders and everything else it needs in
that prefix.

If you run build.py with /opt/misc/Python-2.7.13/bin/python then it will
target the same python for the build. You can also pass --python=/path/to/python if you need to run build.py with a different python than what you are targeting for some reason. (Not needed so much any more, but it was handy in the early days.)

Also, if you built that Python yourself, double check that you configured it with --enable-shared as waf’s configuration step on Linux is likely to fail if the shared lib is not present.

Robin

···

Still having the error:
Running command: build_py
Checking for /opt/misc/github/Phoenix/bin/waf-1.7.15-p1…
“/usr/local/bin/python2.7” /opt/misc/github/Phoenix/bin/waf-1.7.15-p1 --wx_config=/opt/misc/github/Phoenix/build/wxbld/wx-config --jobs=3 --gtk3 --python=“/usr/local/bin/python2.7” --out=build/waf/2.7 configure build
Setting top to
: /opt/misc/github/Phoenix
Setting out to
: /opt/misc/github/Phoenix/build/waf/2.7
Checking for ‘gcc’ (c compiler) : /bin/gcc
Checking for ‘g++’ (c++ compiler) : /bin/g++
Checking for program python
: /usr/local/bin/python2.7
Checking for python version
: (2, 7, 13, ‘final’, 0)
Checking for library python2.7 in LIBDIR : not found
Checking for library python2.7 in python_LIBPL : not found
Checking for library python2.7 in $prefix/libs : not found
Checking for library python2.7m in LIBDIR : not found
Checking for library python2.7m in python_LIBPL : not found
Checking for library python2.7m in $prefix/libs : not found
Checking for library python27 in LIBDIR : not found
Checking for library python27 in python_LIBPL : not found
Checking for library python27 in $prefix/libs : not found
Checking for program /usr/local/bin/python2.7-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/local/bin/python2.7-config
Checking for header Python. h
: :frowning:
Asking python-config for pyembed – cflags flags
: yes
Asking python-config for pyembed – libs flags
: yes
Asking python-config for pyembed – ldflags flags
: yes
Getting pyembed flags from python- config
: Could not build a python embedded interpreter
The configuration failed
(complete log in /opt/misc/github/Phoenix/build/waf/2.7/config.log)
Command '“/usr/local/bin/python2.7”
/opt/misc/github/Phoenix/bin/waf-1.7.15-p1 --wx_config=/opt/misc/github/Phoenix/build/wxbld/wx-config --jobs=3 --gtk3 --python=“/usr/local/bin/python2.7” --out=build/waf/2.7 configure
build ’
failed with exit code 1.
Finished command: build_py (1.98s)
Finished command: build (27.129s)

``

Well
it actually find Python.h, but it fails to build. I attach the complete
log, if someone could help me here.

Thanks.