Switching Python versions

A forum for general discussion of the Python programming language.

Switching Python versions

Postby bliss » Fri May 10, 2013 2:41 pm

I'm a MAC user.
Python 2.7 is the default version installed.
I am learning Python programming right now (just in the very beginning stages).
The book I'm reading right now is for Python 3.0.
I've downloaded and 'installed' Python 3.0 on my mac but I have not switched versions yet.
Switching to Python 3.0 in this case is just a click away. The installer provides that file to click to upgrade your system.
I have not clicked it because I want to make sure that I can switch back to Python 2.7 conveniently when I want to, because although I intend to learn Python by learning Python 3.x, I am seriously thinking about coding in Pyton 2.7 when I already know how to code in Python, because I would like to use KIVY and KIVY at the moment only supports Python 2.7, which leads me to my question.
After I click that button that upgrades my Python version to 3.x, how do I switch back to Python 2.7 and how do I switch back to 3.x?????

Kindly enlighten me on this topic.
Thank oyu very much.
Posts: 15
Joined: Thu May 09, 2013 3:42 am

Re: Switching Python versions

Postby metulburr » Fri May 10, 2013 3:02 pm

i dont know anything much about MAC, but since its based of unix, like linux. I could only assume it would be similiar.

I would just install python3.x and keep python2.x. Then to execute each is based on the number, for example:
Code: Select all
metulburr@ubuntu:~$ python -V
Python 2.7.3
metulburr@ubuntu:~$ python3 -V
Python 3.2.3

where if i wanted to use python 3.2.3 , i would execute
Code: Select all
, if i wanted to execute python 2.7.3, i would execute
Code: Select all
we will be moving to python-forum.io on October 1 2016
more details here
User avatar
Posts: 2244
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 6 guests