vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Using only Python 3

Tue Aug 14, 2012 7:49 am

Hi - silly question. As I am starting my students off on Python for the first time, I will be using Python 3 + "mercurial" PyGame only. Can I easily uninstall Python2 without messing up the Python3+PyGame I already have working? If so, does anyone have pointer to idiot's instructions?
Thanks -- Peter

rpural
Posts: 30
Joined: Fri Feb 24, 2012 2:30 pm
Location: Minnesota
Contact: Website

Re: Using only Python 3

Tue Aug 14, 2012 11:30 am

I haven't tried this, but you have the perfect "test bed" right in front of you: Set up an additional SD Card with both Pythons installed, test Python3, and then uninstall Python 2.7 and test again. If things fail, it was a scratch install in the first place.

As for uninstalling, do a "man apt-get". I think there's a remove option, which is what you'd be looking for. Just be sure to get the right package name, and you're good to go.

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: Using only Python 3

Tue Aug 14, 2012 5:40 pm

Well it turns out that all I had to do was:
1. apt-get remove python
2. Remove remnants of shortcuts on desktop (to IDLE and Python Games)
3. Reboot
Python3 + PyGame still appear to work perfectly well!
Peter

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: Using only Python 3

Tue Aug 14, 2012 5:44 pm

Reading the above reply, prompts me to ask exactly what is the significance of the two 'IDLE' shortcuts on the "wheezy" desktop please?

To those you are 'into' Python... which I currently am not, the answer is probably obvious... sorry!)

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: Using only Python 3

Tue Aug 14, 2012 6:03 pm

Montala wrote:Reading the above reply, prompts me to ask exactly what is the significance of the two 'IDLE' shortcuts on the "wheezy" desktop please?
To those you are 'into' Python... which I currently am not, the answer is probably obvious... sorry!)
Hi - IDLE starts the IDE for Python 2. IDLE3 starts the IDE for Python 3. About a year or so ago, Python 3 was produced to replace Python 2, but some of the changes would stop old programs from working without being reworked first. So Python 2 is kept going for the time being, although only bug fixing from now on. That is why there are 2 x IDLE icons on the desktop - the IDLE one will disappear at some point in the future, but this is probably some time away yet.
Peter

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: Using only Python 3

Tue Aug 14, 2012 7:26 pm

As you were!

First problem I came across was that file manager could no longer go into root mode. Package GKSu missing. So I fired up Aptitude and it shows several broken packages, including SMBClient (which explains why I can't see Windows disks anymore, but less clear how come Windows can still see mine despite reboot!).

It looks like lots of other things depend on bits of Python 2 but don't necessarily say so in their dependencies (otherwise shouldn't apt-get remove have given a warning other than just a long list of what was being uninstalled?)

Seems a better plan MIGHT simply to have been to:
1. Delete the IDLE and Python Games icons on the desktop
2. Remove IDLE from the start menu
3. Otherwise leave Python 2 alone!

This would have made it very hard for my students to start it by accident, unless they go looking for it. If I also associate .py files with IDLE3 and Python3 (which I have already done) makes it even more difficult!

Not sure how best to repair this - I will try reinstalling all the broken packages and see if this brings the missing bits back.

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Using only Python 3

Tue Aug 14, 2012 11:03 pm

vinntec wrote:About a year or so ago
Longer, I learnt python3 2 years ago and it wasn't new then, infact according to google it came out in 2008. Its been one of those failed starts really.

timhoffman
Posts: 85
Joined: Sat Nov 05, 2011 11:31 pm

Re: Using only Python 3

Wed Aug 15, 2012 11:18 am

6677 wrote:
vinntec wrote:About a year or so ago
Longer, I learnt python3 2 years ago and it wasn't new then, infact according to google it came out in 2008. Its been one of those failed starts really.
No at all. It just takes a long time for 1. things to settle down, no one was going to use the first version of 3.x and 2. There is a huge amount of momentum behind the 2.x code base.

The momentum towards 3.x is growing significantly in the last 12 months. These things take time. Have a look at how well perl is moving from 5.x to 6.x

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: Using only Python 3

Wed Aug 15, 2012 8:35 pm

OK have a MK II plan working now. Have deleted IDLE 2 and Python Games shortcuts from the desktop and cleared IDLE 2 and Python 2 from the menus - see http://www.raspberrypi.org/phpBB3/viewt ... 23#p150623 for details of what I did if you are interested.
Peter

Return to “Python”