install python 2.6 on Ubuntu 12.04

Dan Stromberg drsalists at gmail.com
Tue May 22 20:09:15 EDT 2012


If the pythons you require are in synaptic (sudo to root and run synaptic),
you probably can just use them.

If not, then you, for each release, need to:
1) download a tarball using a browser or whatever
2) extract the tarball: tar xvfp foo.tar.bz2
3) cd into the newly created, top-level directory, and run ./configure
--prefix /usr/local/cpython-2.6 (or similar)
4) Run "make", optionally with parallelism; I often use number_of_cores+1,
so for a quad core system, I might use "make -j 5".  This speeds up the
build.
5) Run /usr/local/cpython-2.6/bin/python - just to make sure it gives a
prompt.  control-d to exit.
6) Try running your script with one of your new python builds:
/usr/local/cpython-2.6/bin/python my-script

I've done this for 2.5, 2.6, 2.7, 3.0, 3.1, 3.2 and the 3.3 preview stuff.
They cooperate with each other well.  Actually, I scripted out the build so
that I'd get all 7 built automatically with cython and pylint in them.

On Tue, May 22, 2012 at 4:47 PM, Gelonida N <gelonida at gmail.com> wrote:

> Hi,
>
> On Ubuntu 12.04 python 2.7 is the default version
>
> I'd like to install python 2.6 parallel to 2.7 and create a virtualenv for
> it.
>
> The reason is, that I have to write some code, that will be executed under
> 2.6 and I want to be sure, that I don't accidentally write code, that would
> no more run on 2.6.
>
> What would be the recommended way to install (compile) 2.6 on 12.04?
>
>
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120522/642fac58/attachment.html>


More information about the Python-list mailing list