Page 1 of 1

How to install Python 3 on jessie?

Posted: Sun Apr 24, 2016 1:17 pm
by dontaxe
Hey there

Kind of new to Linux and RPi..
I'm using the Raspbian Jessie lite 18-3-2016 on a RPi 2 Model b
The standard Python version in that OS is Python 2.7.9
How do I install python 3.5.1 and remove the 2.7.9 version?

I know its a very basic question but as I said I am new to the whole Linux terminal and couldn't find any comprehensive guide.
Thank you

Re: How to install Python 3 on jessie?

Posted: Sun Apr 24, 2016 1:25 pm
by croston
It will probably break things if you removed Python 2.7, however Python 3.4 is already installed if you use 'python3' instead of 'python'. If you want the latest Python 3.5.1 then you have to compile it from source. I have written instructions on my blog:
http://wyre-it.co.uk/blog/latestpython/

Re: How to install Python 3 on jessie?

Posted: Sun Apr 24, 2016 1:52 pm
by DirkS
croston wrote:Python 3.4 is already installed if you use 'python3' instead of 'python'.
OP is using the Jessie Lite image which only has Python 2 installed.

Re: How to install Python 3 on jessie?

Posted: Sun Apr 24, 2016 1:55 pm
by jahboater
On Raspbian Lite:

Code: Select all

sudo apt-get install python3
Installs Python 3.4

Re: How to install Python 3 on jessie?

Posted: Sun Apr 24, 2016 3:46 pm
by dontaxe
croston wrote:It will probably break things if you removed Python 2.7, however Python 3.4 is already installed if you use 'python3' instead of 'python'. If you want the latest Python 3.5.1 then you have to compile it from source. I have written instructions on my blog:
http://wyre-it.co.uk/blog/latestpython/
It took about a half an hour but it worked!
Thank you very much!
Still don't understand how but never the less :)

Re: How to install Python 3 on jessie?

Posted: Mon Apr 25, 2016 7:35 pm
by liudr
My tutorial has more explanation:

https://liudr.wordpress.com/2016/02/04/ ... or-debian/

I found various instructions online and did the install myself, FYI. It will not interfere with existing python 3.4 or 3.2 (wheezy).