title: Install python 32 bit on 64 bit linux
body: <p>I basically have two questions:</p>
  
  <ol>
  <li>How do you install 32bit python alongside 64bit python on linux?</li>
  <li>How do I fix my broken system from the failed attempt below?</li>
  </ol>
  
  <p>I just tried to install 32bit python alongside my 64bit python on linux mint 16. It's not as straight forward as I hoped for (something like <code>sudo apt-get install python32</code> would be nice) but after a bit of googling I downloaded python 2.7.6 and did the following:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The should supposedly make me able to run 32bit og 64bit (default) like this:</p>
  
  <pre><code>python -c 'import sys; print sys.maxint'
  /opt/pym32/bin/python -c 'import sys; print sys.maxint'
  </code></pre>
  
  <p>... but /opt/pym32/ wasn't even created. Worse, my system now reports 29 broken dependencies, indicating that the new python replaced the old one or something like that. To fix it, aptitude suggests that I remove a whole bunch of packages that I need and install a whole bunch of packages that I don't need. </p>
  
  <p>I used <code>checkinstall</code> rather than <code>make install</code> to be able to reverse/uninstall if something went wrong, but uninstalling/reinstalling python won't work because of the broken dependencies. Is there a way to get out of this mess?</p>