./configure does not find libpython2.7?

I’ve installed Python2.7 with --enable-shared option:

[0 root]$ ll /usr/local/lib/libpython2.7.dylib lrwxr-xr-x 1 samvel admin 45 Aug 3 16:41 /usr/local/lib/libpython2.7.dylib -> ../Cellar/python/2.7.3/lib/libpython2.7.dylib [0 root]$ ll /usr/local/Cellar/python/2.7.3/lib/libpython2.7.dylib -r-xr-xr-x 1 samvel admin 2030792 Aug 3 16:41 /usr/local/Cellar/python/2.7.3/lib/libpython2.7.dylib

Now, the root configure does not find libpython2.7:

./configure macosx --enable-python --prefix=$PWD/try --etcdir=$PWD/try/etc/root ... Checking for Python.h ... /usr/local/bin/../Cellar/python/2.7.3/include/python2.7 Checking for python2.7, libpython2.7, libpython, python, or Python ... no ... Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_glew, builtin_pcre, builtin_lzma, cintex, explicitlink, fink, genvector, krb5, ldap, memstat, odbc, opengl, reflex, shared, ssl, tmva, x11, xft, xml. ...

Why?

A brutal fix …
Try to execute:
python-config --includes
python-config --cflags
python-config --ldflags
The outputs of the first two commands should contain something like “-I/path/to/your/python/includes”, while the output of the third command should contain something like “-L/path/to/your/python/libraries”.
Then try to configure ROOT using:
–enable-python --with-python-incdir=/path/to/your/python/includes --with-python-libdir=/path/to/your/python/libraries

Thanks for help. The output of these commands is:

[code]python-config --includes
-I/usr/local/Cellar/python/2.7.3/include/python2.7 -I/usr/local/Cellar/python/2.7.3/include/python2.7

python-config --cflags
-I/usr/local/Cellar/python/2.7.3/include/python2.7 -I/usr/local/Cellar/python/2.7.3/include/python2.7 -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

python-config --ldflags
-ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error[/code]

So, there is no -L. However, I’ve tried this:

[code]ls -l python-config --prefix/include/python2.7

-rw-r–r-- 1 samvel admin 4329 Aug 3 16:40 Python.h

ls -l python-config --prefix/lib

-r-xr-xr-x 1 samvel admin 2030792 Aug 3 16:41 libpython2.7.dylib

./configure macosx --enable-python --prefix=$PWD/try --etcdir=$PWD/try/etc/root --with-python-incdir=python-config --prefix/include/python2.7 --with-python-libdir=python-config --prefix/lib

Checking for Python.h … /usr/local/Cellar/python/2.7.3/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python … no

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_glew, builtin_pcre, builtin_lzma, cintex, explicitlink, fink, genvector, krb5, ldap, memstat, odbc, opengl, reflex, shared, ssl, tmva, x11, xft, xml.[/code]

Again: Python is not enabled :frowning:

Try (maybe this will contain “-L”):
python-config --libs

If this fails, try to ask this question on the “PyROOT Support” forum: http://root.cern.ch/phpBB3/viewforum.php?f=14

Maybe you could also check:
echo $PYTHONDIR
type python
which python

Thanks @pepe. I’ll ask this question on PyROOT then.

Note … this thread is “continued” in: [url]PyROOT on OS X 10.8: libpython2.7 is not found