Python Versions

Currently the most widely used version are Python2.x and Python3.x. The difference within each version is almost pointless to mention. You will either have some form of 2.x or some form of 3.x. You can have both 2.x and 3.x installed on the same system and run each separately.

Normally when you think of versions, you expect the latest to be the best, right? If you are looking for 3rd party modules to use with your python scripts, then python2.x currently has the lead, because not everything has been ported to python3.x yet. If your installing a module for python and your using 3.x, read up on the documentation for that module to check if it is 3.x compatable.

If your using Python3.x, you will surely come across code online more often written in Python2.x. For beginners, the problem lies in different modules renamed, placed elsewhere, etc. that will confuse the hell out of you. If you attempt to run example code and find you have an import error while running Python3.x, the problem is more often a conflict of version. This Porting Guide will allow you to easily find the problem and correct it with the proper Python3.x module.

Check your version

If you don't know what version you are using, there are a few methods to use to find out. One way is in the python interpreter itself.

In a terminal or DOS prompt, running python with the argument -V, will give you the version.