[Tutor] Using python 3 on Ubuntu 14.04

Ben Finney ben+python at benfinney.id.au
Wed Dec 23 18:03:50 EST 2015


Jim Byrnes <jf_byrnes at comcast.net> writes:

> If I simply start it with  python passwords.py  it runs fine.

If you type ‘python --version’ and ‘python3 --version’ you will see two
different version numbers.

Different versions of Python have their own separate run-time
environments. Any modules you want a particular Python interpreter to
import, must be installed specifically for that interperter to find.

> There is no need to use python 3 on this particular program but if I
> wanted to write for python 3 in the future what do I need to do to run
> programs with it?

You need to install the Python 3 modules for the correct Python 3
version.

-- 
 \        “It is undesirable to believe a proposition when there is no |
  `\   ground whatever for supposing it true.” —Bertrand Russell, _The |
_o__)                                       Value of Scepticism_, 1928 |
Ben Finney



More information about the Tutor mailing list