473,406 Members | 2,867 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,406 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 1582
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.