Dual Python Installed Environments..

S

sam

Hi..

I'm looking to install dual versions of python 2.3, 2.4 on the same box. I'm
trying to figure out if there's something I'm missing, some kind of gotchas
that I haven't seen.

I'm also trying to figure out how to allow my script to determine which
version to use???

Thanks
 
D

Diez B. Roggisch

sam said:
Hi..

I'm looking to install dual versions of python 2.3, 2.4 on the same box. I'm
trying to figure out if there's something I'm missing, some kind of gotchas
that I haven't seen.

THey shouldn't affect each other.
I'm also trying to figure out how to allow my script to determine which
version to use???

under unix - simple as this:

#!/usr/bin/env python<version>

Under Windows... well, I don't use that.

Diez
 
A

algotother

Gaia dhuit,


Well, hello
I'm looking to install dual versions of python 2.3, 2.4 on the same box. I'm
trying to figure out if there's something I'm missing, some kind of gotchas
that I haven't seen.

I know what you mean - sometimes things are just *too easy* to believe
with Python.

This is one of those:
Just make sure you get the prefix right at installation time, and
Python takes care of the rest., the two installations will be kept as
separate as as the directories you choose.
I'm also trying to figure out how to allow my script to determine which
version to use???

Other things are more difficult: I cannot see how your script can
choose an interpreter before the script is running.#

OTOH one script could easily choose the correct interpreter for
another script, e.g.

#! /bin/bash

if $MOON_IS_BLUE
then
~/python24/bin/python script.py
else
/usr/bin/python script.py
fi

Tá fáilte romhat
 
N

Neil Wallace

Hi..

I'm looking to install dual versions of python 2.3, 2.4 on the same box.
I'm trying to figure out if there's something I'm missing, some kind of
gotchas that I haven't seen.

I'm also trying to figure out how to allow my script to determine which
version to use???

Thanks

Here's one that tripped me up...
I altered the symlink at /usr/bin/python to point to Python 2.2 which I
installed in my home folder (see below for the reason.. in case you are
wondering) this broke some packages in my distribution (Ubuntu).
I could see the broken packages, and didn't need them anymore, but I was
unable to remove them as the removal scripts were (presumably) python 2.4+

Much head scratching at the time.

Neil.
Reason - I had written some CGI scripts and tested them thoroughly on my
localhost version of the site. However I uploaded the files, and some of
them didn't work, my sites server (not under my full control) runs Python
2.2, so I downloaded 2.2, and made it default so that localhost used this
version so I could retest and ammend etc..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top