LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cannot Install PyGTK (https://www.linuxquestions.org/questions/linux-software-2/cannot-install-pygtk-104882/)

drxsmurf 10-16-2003 05:44 PM

Cannot Install PyGTK
 
When i run the./configure command, the app starts to run and it begins to build itself. But then it encounters the following error:

checking for a Python interpreter with version >= 2.2... python
checking for python... /usr/bin/python
checking for python version... 2.2
checking for python platform... linux-i386
checking for python script directory... ${prefix}/lib/python2.2/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.2/site-packages
checking for headers required to compile python extensions... not found
configure: error: could not find Python headers

Are there any parameters that i must add to the ./configure to direct it to my python folder?

If anyone has any experience with PyGTk....i could really use the help.

bulliver 10-16-2003 06:27 PM

The headers are not in the actual python directory. Mine are in /usr/include/python2.2

They may also be in /usr/local/include/python2.2 but probably not.

You will want to do:

./configure --include-path=/usr/local/include/python2.2

but run ./configure --help first to see if the option is supported. I can't remember offhand what the option is called but it will mention "include" in it.

drxsmurf 10-17-2003 12:20 AM

Yeah i used that parameter, but i pointed it to the wrong directory (/usr/lib/python, or something like that) and it didnt work.

Thanks for your help...ive been trying to get this blasted thing to work so that i can use Nicotine finally

drxsmurf 10-17-2003 12:27 AM

Will this dir work?

./configure --includedir=/usr/lib/python2.2

I tried looking in the directory that you suggested but to no effect.

bulliver 10-17-2003 05:31 AM

It certainly will not work, you need to point this directive at the python headers.

What do you mean "I tried looking in the directory that you suggested but to no effect." Do you mean there is no such directory? 'cd' to /usr/include/ and 'ls', is there anything with python in the name?

Try 'locate Python.h' and tell me what the result is...

It is starting to seem as though you dont have the headers installed at all. That's why I don't like rpm's. Sometimes Redhat and Mandrake will split the headers into 'development' rpms, and not install them by default. Check your install disks for any rpms like "python-headers" or "python-development" and install them. Also, check for a PyGTK rpm, might save all this hassle.

BTW.. I use nicotine myself. It kicks a** :)

drxsmurf 10-17-2003 11:31 AM

I checked /usr/include, and there is no folder or file named python. Should i reinstall python itself to get the headers? when i run locate python.h, the following is returned

/usr/share/doc/libxml2-2.5.4/python.html
/usr/share/doc/libxslt1-1.0.27/python.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/Secure-Programs-HOWTO/python.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/XML-RPC-HOWTO/xmlrpc-howto-python.html
/usr/share/doc/HOWTO/HTML/en/Secure-Programs/python.html
/usr/share/doc/HOWTO/HTML/en/XML-RPC/xmlrpc-howto-python.html



Also, i tried installing the PyGTK RPM from the following link (http://bohr.phys.ntnu.no/~terjeros/d...1_rh9.i386.rpm), and i was presented withthe following error upon installation:

Conflicts were detected

gtk2 = 2.0.0 is needed by pygtk2-2.0.0.1_rh9
python2 = 2.2 is needed by pygtk2-2.0.0.1_rh9

Install aborted.

Aslo, after i start the install from the RPM, Mandrake tells me that the signature is incorrect.

EDIT:
I am at my wit's end...i even installed a the latest version of python, which installed the headers into the directory /usr/local/include/python2.3. Now when i run ./congfigure --includedir=/usr/local/include/python2.3, the same error message pops up.
ARRRRGHHH:o

bulliver 10-17-2003 03:25 PM

Python.h is one of the headers..I just wanted to see if you had them installed somewhere strange...as you can see they were not installed at all.

Did you uninstall the old version of python first? You may have a conflict there. Did you install python2.3 from source or from another rpm? Do you have gtk2 installed?

I don't know what to tell you...this is why I don't use an rpm based distro anymore...rpm is flawed in my (and a lot of others...) opinion. You end up chasing your own tail through a dependancy nightmare, as I am sure you have found.

Quote:

Now when i run ./congfigure --includedir=/usr/local/include/python2.3 the same error message pops up
That is pretty bizarre. Are you sure the error is *exactly* the same?

drxsmurf 10-19-2003 05:47 PM

Yeah it's the same message.

Call me stupid, but how do i uninstall? I am a little new to all of this :)

bulliver 10-20-2003 12:13 AM

Uninstall what? I thought the issue was that you could not get the thing installed in the first place?

In general, uninstalling will depend on how you installed.
RPM:
Code:

rpm -e packagename
SOURCE:
Code:

cd packagename
make uninstall

That's if your lucky enough that the developer created an make uninstall rule...if not, you will simply have to find the relevant files and rm them manually, and most likely you will just have to deal with some leftover cruft on your system.

I really do recommend migrating to a distro that does not use RPMs. Slackware, Arch Linux and Debian are good bets, and you do not need to be a guru to install or use them. Gentoo's portage system is virtually flawless, but I am not sure that you are ready for that yet, as running Gentoo does require some finesse on the command line. Arch has a great package manager too, and the learning curve is not as steep.

I am hesitant to tell anyone to quit using ANY type of Linux, but I see so much trouble and frustration over those stupid RPMs. One of the problems is that the RPM creator decides where the files will actually be installed...so if you are using third-party RPMs, you may find files getting installed in seemingly random places. Plus as I'm sure you've discovered, RPM dependancy tracking is quite broken in most cases.

I think I have heard that you can install and use Debian's apt-get package management system with Mandy and Redhat, so perhaps that's something you could look at.

Do what you will, I just don't want you to get discouraged with Linux...


All times are GMT -5. The time now is 12:05 PM.