How to install 64-bit python on Ubuntu

Roger Binns rogerb at
Thu Oct 8 01:07:34 CEST 2009

Curious wrote:
> Ubuntu comes pre-installed with Python2.6 but this python installation
> is a 32 bit installation. 

For 64 bit Ubuntu you are mistaken:

$ file /usr/bin/python2.6
/usr/bin/python2.6: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

> I do the following to know if the current python installation is 32-
> bit or 64-bit:

This is what I do:

>>> import ctypes
>>> ctypes.sizeof(ctypes.c_void_p)


More information about the Python-list mailing list