Install python 32 bit on 64 bit Linux

I basically have two questions:

  • How do you install 32-bit python with 64-bit python on Linux?
  • How to fix my broken system from a failed attempt below?

I just tried installing 32-bit python along with my 64-bit python on linux mint 16. This is not as straight forward as I had hoped (something like sudo apt-get install python32 would be nice), but after a bit of googling I downloaded python 2.7.6 and did the following:

 sudo apt-get install ia32-libs gcc-multilib checkinstall CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -Lpwd/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure --prefix=/opt/pym32 make sudo checkinstall 

Presumably, I should run 32bit og 64bit (by default) as follows:

 python -c 'import sys; print sys.maxint' /opt/pym32/bin/python -c 'import sys; print sys.maxint' 

... but / opt / pym32 / was not even created. Even worse, my system now reports 29 broken dependencies, indicating that the new python has replaced the old one or something like that. To fix this, aptitude offers me to remove a whole bunch of packages that I need and install a whole bunch of packages that I don't need.

I used checkinstall instead of make install to be able to uninstall / remove if something went wrong, but uninstalling / reinstalling python will not work due to broken dependencies. Is there any way to get out of this mess?

+6
source share
2 answers

I think you should use a virtual environment and install a different version of python in it. Check this answer for a better understanding β†’ Is it possible to install another version of Python on Virtualenv?

+3
source

You might be better off creating your own RPM. You can even automate it by pulling the latest version (or the one you want). Then you can customize your own dependencies. Set 64 bits to keep your applications running.

0
source

All Articles