473,287 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Dual Python Installed Environments..

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

Oct 25 '07 #1
3 1578
sam schrieb:
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
Oct 25 '07 #2
Gaia dhuit,

On Oct 25, 10:45 pm, "sam" <bedoug...@earthlink.netdropped 2 cents
into the slot and wrote:
Hi..
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
Thanks
Tá fáilte romhat

--
jab

Gaia leat

Oct 26 '07 #3
On Thu, 25 Oct 2007 14:45:51 -0700, sam wrote:
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..

Oct 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: Jon Perez | last post by:
Can one run a 1.5 .pyc file with the 2.x version interpreters and vice versa? How about running a 2.x .pyc using a 2.y interpreter?
0
by: Fuzzyman | last post by:
Movable Python has just been released on sourceforge. Movable Python is a frozen distribution of Python. It will run python scripts without needing to be installed. ...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
8
by: Jan Danielsson | last post by:
Hello all, How do I make a python script actually a _python_ in unix:ish environments? I know about adding: #!/bin/sh ..as the first row in a shell script, but when I installed python on...
13
by: Eric Pederson | last post by:
Raise your hand if you think the best technology wins! For those of you with your hands in the air, tell me: if Python is so good,why has PHP achieved such greater adoption and mindshare? Why...
0
by: | last post by:
Greetings. In an effort to get python2.4 on my Centos 3.7, I installed the python bootstrap rpm. This installed 2.4 alongside 2.2 and updated yum to 2.4.0. Oddly, it didn't create a symlink...
5
by: Ben Kovitz | last post by:
Hi, I just tried to run Tkinter on OS X 10.3.9 under Python 2.4.3, and I'm getting a bus error as soon as I call Tk(). Googling has turned up info other Tkinter bus errors, but not this one that...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
4
by: Alia Khouri | last post by:
Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.