dontaxe
Posts: 2
Joined: Sun Apr 24, 2016 12:56 pm

How to install Python 3 on jessie?

Sun Apr 24, 2016 1:17 pm

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

User avatar
croston
Posts: 705
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: How to install Python 3 on jessie?

Sun Apr 24, 2016 1:25 pm

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/

DirkS
Posts: 10218
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to install Python 3 on jessie?

Sun Apr 24, 2016 1:52 pm

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.

jahboater
Posts: 5222
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: How to install Python 3 on jessie?

Sun Apr 24, 2016 1:55 pm

On Raspbian Lite:

Code: Select all

sudo apt-get install python3
Installs Python 3.4
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."
- Greta Thunberg

dontaxe
Posts: 2
Joined: Sun Apr 24, 2016 12:56 pm

Re: How to install Python 3 on jessie?

Sun Apr 24, 2016 3:46 pm

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 :)

User avatar
liudr
Posts: 687
Joined: Sat Jun 01, 2013 12:11 am
Location: Central MN, USA
Contact: Website

Re: How to install Python 3 on jessie?

Mon Apr 25, 2016 7:35 pm

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).
Arduino data loggers, user interface, printed circuit board designer since 2009, RPI 3B 2B 2B Zero Jessie, assembly/C/C++/java/python programmer since the 80's

Return to “Python”