Dealing with large memory under linux or How to Build 64bit Python

"Martin v. Löwis" martin at v.loewis.de
Thu Jan 22 15:30:30 EST 2009


> I've got an Ubuntu (2.6.27-9-server SMP  i686 GNU/Linux) setup with
> 6GB RAM running python 2.5. I'm running a simulation program that is
> breaking as soon as it hits ~3GB RAM even though I have plenty of RAM
> free. I'm guessing that it's because my python is only 32-bit?

If you do use a 32-bit python, then yes, that's the reason.

> Appreciate any pointers on how to get my app to be capable of using
> the full amount of RAM. I'm anticipating this may require me to
> rebuild python from scratch for 64bits but I can't find instructions
> on how to do that. 

As a starting point, you need to install a 64-bit operating system.
If you are running a 32-bit kernel, then there is *no way* that you
could possibly run a 64-bit Python on it.

When you do install a 64-bit (i.e. AMD64) version of Ubuntu, it will
come with a 64-bit Python executable, so no need to build Python at
all. If you still wish to rebuild Python, then, on the 64-bit Ubuntu,
the standard configure;make;make install will do the trick.

Regards,
Martin



More information about the Python-list mailing list