Python 3

Hi Guys

I would like to have Python 3 installed on my PC but the repos only have v2.7.4, I’ve been on the Python website but I can’t find a packaged version for Linux, I’ve downloaded v3.4 tar.xz, but I’m not familiar with compiling from source.

Can anyone tell me where I can find a packedged version or how I compile the tarbal

Many thanks

Graeme

python3 is probably already installed (as well as python 2.7)

You’d run a python 2.7 app with:

python myapp.py

or a pthoyn3 app with:

python3 myapp.py

an executable python script is told which python environment to use by having
#!/usr/bin/env python2.7
or
#!/usr/bin/env python3
as the FIRST line (shebang line) in the script.


[EDIT]

Easiest way to check if python3 is installed … run:

python3 --version

if that returns a version … it’s installed :wink:

If you’re going to be using IDLE for python3 … install the idle3 package (in the repos).

Thanks Mark that’s sorted it

I already had v3,3,1 installed and IDLE3 was in the repos as you suggested

Once again thanks for your help

Graeme