PyQt setup on Linux Mandrake 8.2

Paul Boddie paul at
Mon Sep 23 04:14:23 EDT 2002

djw <dwelch91 at> wrote in message news:<3D8E74A4.7000404 at>...
> Thanks to you and the others, I finally got this to work. My remaining 
> question/problem/puzzlement is what to do about the fact I now have two 
> Python 2.2 installs on my system.

Don't worry about this: I run Red Hat 7.3 and have at least two Python
installations present. It doesn't make any difference in practice,
provided you know which one you're using.

>                                   Mandrake installed everything during 
> its setup into /usr and everything I built/installed went into 
> /usr/local. I was going to rip out the version that Mandrake layed down 
> in /usr and just use the /usr/local copy, but when I ran the package 
> manager and told it to uninstall all the various py* pieces, the list of 
> dependencies it wanted to also delete was scary (stuff like filesystem 
> modules).

I'm sure that RPM and other package management systems look great on
paper (although I'm not entirely convinced by RPM), but the more
irritating problems with them seem to arise when the people who put
the packages together decide to split them up into "runtime" and
"devel", regardless of whether this makes any real sense, and then
leave out "Python.h" or whatever other essential file might be
required by any software that needs to make use of (for example)
Python. I suppose you're really supposed to install an RPM of that
software, prepared by the same person who made the original Python
packages, if only because that person has the luxury of having built
from source.

>           Unfortunately, when I try to install new py modules, they all 
> want to install into /usr instead of /usr/local, since /usr/bin/python 
> is ahead of /usr/local/bin/python on $PATH, causing sys.prefix to point 
> to /usr, I suppose.

Solution: set your PATH appropriately for all users who want the new
installation of Python. There shouldn't be any major danger of
inadvertently using the wrong versions of other software, at least on
Linux systems, because /usr/local is probably pretty empty after
installing a mainstream Linux distribution - it's not like mixing up
/usr/ccs and /usr/ucb on Solaris and then finding out that you're
running some "other" version of your favourite tools.

> So, this leaves me wondering... its not possible to install Mandrake 
> without Python (as evidenced by the dependencies), but the location it 
> is installed at is "wrong" by default - so, what is the "proper" way to 
> handle this situation? (It would seem nice to install Linux without 
> Python and compile and install it afterwards).

Ignore the distribution's installations and install your own in
/usr/local, which helpfully happens to be the default "prefix", and
then complain to your distribution vendor. What then seems to happen,
based on experiences made public with Red Hat, is that they then
ignore those suggestions whilst issuing vague hints that their chosen
Python strategy makes complete sense, and that the entire Python
community is "missing something".

>                                                I can't tell from your 
> list of commands where python is located, but I assume its in /usr?

It usually is.

> Also, I noticed that the copy of python that was installed by the system 
> lacked Python.h, whereas the copy I compiled and installed had this 
> file. Are you supposed to "overlay" the system copy in /usr with the 
> extra files that things like sip/pyqt need (i.e., Python.h)?

You're not supposed to do things like that, especially since there
could always be versioning issues in doing so, but Python.h does at
least seem to have the same contents regardless of how your own Python
installation was configured.


More information about the Python-list mailing list