Main index > Installation problems > problem with Python include path on Debian [SOLVED]

By ]SwH[ (User), on Fri Mar 18 12:27:39 2005: problem with Python include path on Debian [SOLVED].

Hi all
i'm trying to install aDesklets 0.4.5 on my Debian unstable but when i run ./configure it say me this:

Quote:


checking for python... /usr/bin/python
checking if Python version >= 2.3... okay
checking local Python configuration... looks good
checking for Python include path...
configure: error: cannot find Python include path

and the same error with 0.4.3, i tried with --with-python-force-detection but nothing change.
the problem is that i have the include dir /usr/include/python2.3/ and i don't know how to fix this problem :| i also tried with some workaround (change the configure script, link /usr/include/python2.3/ to /usr/include/python/) but with no result.
i do something wrong? can i solve this problem in some way?
Thanks

By syfou (Core Developer & Desklet Author), on Fri Mar 18 13:24:58 2005.

No, you did everything fine as far as I see... (and --enable-python-force-detection will not help with that, you are right). I extracted the relevant detection code from acinclude.m4... Would you save this in a file, chmod +x it, run this and finally post back the output?

Code:

#! /bin/sh

PYTHON=/usr/bin/python
PYTHON_VERSION=2.3

# Check for Python include path
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
echo "Initial path: $python_path"
for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/inc lude/python/" "$python_path/" ; do
   python_path=`find $i -type f -name Python.h -print | sed "1q"`
   echo "Current path: $python_path"
   if test -n "$python_path" ; then
      echo 'No path left.'
      break
   fi
done

echo "Final path: $python_path" 
python_path=`echo $python_path | sed "s,/Python.h$,,"`
echo "Treated final path: $python_path"
if test -z "$python_path" ; then
   echo 'cannot find Python include path'
fi



Make sure the two PYTHON* variables on top match those of your config.log file... I used the information you provided, but who knows... So post the output of this too:

Code:


grep '^PYTHON' config.log



By the way, you said you had the same problem with both adesklets 0.4.3 and adesklets 0.4.5... Did you have success installing any version of the package so far on this system?

EDIT:

I just tested myself the adesklets 0.4.5 package on a debian Woody box. No problem on my side, but I installed Python manually on it.

By ]SwH[ (User), on Sat Mar 19 05:21:53 2005.

syfou wrote:

No, you did everything fine as far as I see... (and --enable-python-force-detection will not help with that, you are right). I extracted the relevant detection code from acinclude.m4... Would you save this in a file, chmod +x it, run this and finally post back the output?


Here the output

Quote:

Initial path: /usr
Current path:
find: /usr/include/python/: No such file or directory
Current path:
Current path:
Final path:
Treated final path:
cannot find Python include path


syfou wrote:


Make sure the two PYTHON* variables on top match those of your config.log file... I used the information you provided, but who knows... So post the output of this too:


The variable are ok, anyway i post the output of grep too

Quote:


PYTHON='/usr/bin/python'
PYTHON_CPPFLAGS=''
PYTHON_EXEC_PREFIX='${exec_prefix}'
PYTHON_EXTRA_LIBS=''
PYTHON_HACK=''
PYTHON_INSTALL_SUBMISSION_SCRIPTS_FALSE=''
PYTHON_INSTALL_SUBMISSION_SCRIPTS_TRUE=''
PYTHON_INSTALL_SUBMITION_SCRIPTS_FALSE=''
PYTHON_INSTALL_SUBMITION_SCRIPTS_TRUE=''
PYTHON_LDFLAGS=''
PYTHON_PLATFORM='linux2'
PYTHON_PREFIX='${prefix}'
PYTHON_SITE_PKG=''
PYTHON_SUPPORT_FALSE=''
PYTHON_SUPPORT_TRUE=''
PYTHON_VERSION='2.3'


syfou wrote:


By the way, you said you had the same problem with both adesklets 0.4.3 and adesklets 0.4.5... Did you have success installing any version of the package so far on this system?


No, it's the first time i try to instal this package on my system

syfou wrote:


EDIT:

I just tested myself the adesklets 0.4.5 package on a debian Woody box. No problem on my side, but I installed Python manually on it.


I see, i installed Python via apt-get so maybe the problem could be this but... don't know :| i'm quite a noob in this kind of problems :?
Thanks again

By syfou (Core Developer & Desklet Author), on Sat Mar 19 12:08:28 2005.

Your output means that the Python.h header could not be found where it should be, namely, on your system, anywhere in a subdirectory of /usr. So I tend to think the intitial output of configure :

Code:


checking for Python include path...
configure: error: cannot find Python include path



was accurate. I do not use Debian very often myself; maybe is there two different packaging of Python for apt-get? If it is the case, you need the one used for development.. If this des not work, you always have the choice installing it by hand - it is also pretty straightforward.

By ]SwH[ (User), on Mon Mar 21 15:07:28 2005: problem with Python include path on Debian [SOLVED].

syfou wrote:

Your output means that the Python.h header could not be found where it should be, namely, on your system, anywhere in a subdirectory of /usr. So I tend to think the intitial output of configure :

Code:


checking for Python include path...
configure: error: cannot find Python include path



was accurate. I do not use Debian very often myself; maybe is there two different packaging of Python for apt-get? If it is the case, you need the one used for development.. If this des not work, you always have the choice installing it by hand - it is also pretty straightforward.


In fact that was the problem :) i found out it when i reading with more attention the script you gave me, it looks for the file Python.h that is in the python2.3-dev package, now i'm running adesklets and i can say that it's really nice :D
Thank you again for replay and help :)

By TimSchutte (Fearless Moderator), on Tue Apr 19 16:16:25 2005.

Hi Guys,

Quote:

In fact that was the problem Smile i found out it when i reading with more attention the script you gave me, it looks for the file Python.h that is in the python2.3-dev package, now i'm running adesklets and i can say that it's really nice Very Happy
Thank you again for replay and help Smile


Excellent!

I had the exact same problem with adesklets-0.4.8--I didn't have the devel packages installed on my Mandrake 10.1 system either. Installing the proper packages allowed me to install the latest version, and poor Sylvain didn't have to spend another afternoon slogging through my system.

Thanks all!
Tim
Fearless moderator


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.