[Tutor] How to work with a later version of Python

Alan Gauld alan.gauld at yahoo.co.uk
Thu Oct 1 04:49:35 EDT 2020


On 30/09/2020 23:58, Neveills, Sarah wrote:

> I have version 3.8.3 of Python installed on my MAC OS.
> 
> The homework I need to do will only work with version 3.6 (and no later or
> earlier). 

That's very unlikely. Python versions are intended to be backwardly
compatible so any 3.6 code should work on 3.8. It would need to be
deliberately written to prevent forward compatibility which would be
very odd, or it would need to use some very specialized libraries.

Have you tried it?

> I have downloaded Python 3.6, but how do I work in version 3.6
> instead of 3.8.3?

At the simplest level you can simply call the python3.6
interpreter explicitly.

The best solution would be to create a virtual environment.
If you do a search for python virtual environment you should
find a wealth of material.

> I need to figure out how to switch between editions...please advise.

I'd check first that your code really won't work in 3.8.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list