[Python-Dev] Python 32- and 64-bit living together

Sérgio Durigan Júnior sergiodj at linux.vnet.ibm.com
Fri Apr 11 22:25:08 CEST 2008

On Fri, 2008-04-11 at 22:06 +0200, M.-A. Lemburg wrote:
> > Hmm, right. I tried to modify the installation path (using --libdir
> > in ./configure) to /usr/lib64, but some *.pyo objects still are
> > installed under /usr/lib. AFAIK, these objects are bitness-dependent
> > (i.e., if they were generated by a 32-bit Python, they can only be
> > execute by a 32-bit Python - and vice-versa), right?
> Right.
> > Is there any way to separate these arch-dependent files in /usr/lib
> > and /usr/lib64 depending on their bitness?
> There's no need for that. Only the config/ dir which is included
> in the Python lib dir is dependent on the Python configuration.

I'm afraid I still don't understand your point. I mean, if the *.pyo
file *is* dependent on the bitness of the Python interpreter (as you
confirmed in my first question), therefore when I decide to have both
32- and 64-bit Python on my system I *must* have two versions of
every .pyo file: one for 32- and another for 64-bit Python. What I've

> You should probably have a look at how RedHat or openSUSE solve
> these problems. Some of them have patched Python to fit their
> needs. You may have to do that as well.

I'll sure take a look at them. Thanks!

Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil

More information about the Python-Dev mailing list