@ Connor -- you probably should heed the advice of Alan and leave your existing 
Python 2.x install alone.  For the exercises in your book, you should be able 
to include this line at the top of every script and it'll work just fine.  I 
can't remember, you may need to chmod +x in order for this to work.  Anyone?

#! /usr/bin/python3

Or, use python3 to open the script from the command line: connor@linuxbox# 
python3 script.py
This is how I test on my Ubuntu install.

-----Original Message-----
From: tutor-bounces+jeremy.clark=ucr....@python.org 
[mailto:tutor-bounces+jeremy.clark=ucr....@python.org] On Behalf Of Alan Gauld
Sent: Tuesday, August 16, 2011 9:07 AM
To: tutor@python.org
Subject: Re: [Tutor] which version do i have and how do i change it

On 16/08/11 10:14, Lisi wrote:
> On Tuesday 16 August 2011 09:05:44 Alan Gauld wrote:
> > You might need to ensure that you have at least 1 version of Python2
> around
> > because a lot of Linux tools are still written in v2 and might break
> if you
> > uninstall all v2 versions...
>
> Thanks for that, Alan.  I knew that I had Python 2 by default and did 
> not have to install it, but had not queried why.
It can be hard to tell, sometimes distro designers just think something is 
useful.
For example many Linux users nowadays have no use for gcc but it is usually 
packaged anyway.

> If it was already on the system , I wonder why the OP needed to 
> install it?

I suspect that the default was probably version 2.5 or 2.6 (My Ubuntu
10.04 has 2.6)
So if OP installed 2.7 it would be additional.

My concern was that if they uninstalled 2.7 the default would revert to
2.6 (or
whatever) and they might then be tempted to uninstall that too!

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to