Python 3.5

Is it possible to install python 3.5 by using apt-get?

Im curious as too why you wanna install it ?

you could get the tarball from the website and compile it

OSMC is based on Debian Jessie. Python 3.4 is available with sudo apt-get install python3. Does it need to be Python 3.5 specifically?

Be sure to force update-alternatives to set Python 2.7 as the default symlink, or you may experience some issues.

Sam

Well, as python 3.5 is out, I would like to use some new features that it brought.
I am doing some home projects so I would always like to be on recent python version.
I don’t understand why the most recent version is not in standard repository.

Debian focuses on stability, and it freezes package versions around 6 months before release. Either find an alternate repository, or compile Python 3.5 from source.

Sam

OK, thanks for an explanation.
Best regards.

Hi Sam, thanks for the great OSMC. It runs very well on my pi2 and the whole family use it everyday.

I plan on installing some home automation stuff and use the pi2 as controller (still running OSMC). For that I need python 3.4 installed. I’d understood it as you can have both versions installed.

I had planned on installing it with sudo apt-get install python3 as you mentioned in this post but don’t quite understand your comment Be sure to force update-alternatives to set Python 2.7 as the default symlink, or you may experience some issues.

I have seen there is a python2.7 symbolic link to /usr/bin/python - do you mean I need to make sure it points to the 2.7 directory or do I need to do anything else that I dont understand?
Please help as I’m no unix pro :slightly_smiling:

I might have found the answer my self here.
Is this what you mean ?

i just updated to OSMC 20170210 - i am trying to link my rpi2 to cayenne but it says that it needs dependencies and that python3 is not installed. It keeps saying that all the dependencies don’t have other dependencies. Thoughts?

the script that i am running is from cayenne’s add devices page:

wget https://cayenne.mydevices.com/dl/rpi_9mcjnmycx6.sh

sudo bash rpi_9mcjnmycx6.sh -v

this is what the error looks like in terminal:

Sat Feb 18 12:00:26 EST 2017 Installing myDevices agent
0
(50%)
Sat Feb 18 12:00:33 EST 2017 Copying agent libraries
(55%)
Sat Feb 18 12:00:35 EST 2017 Installing python utils
(60%)
Sat Feb 18 12:00:38 EST 2017 Installing software components
Sat Feb 18 12:00:38 EST 2017 Cannot install for : missing development headers\n
Sat Feb 18 12:00:38 EST 2017 Finished agent code
Sat Feb 18 12:00:38 EST 2017 ERROR: myDevices cannot be installed - python3 cannot found

Probably need something like apt-get install python3-dev

osmc@osmc:~$ sudo apt-get install python3-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
expect : Depends: tcl8.5 (>= 8.5.0) but it is not going to be installed
libiw-dev : Depends: libiw30 (= 30~pre9-8) but it is not going to be installed
Depends: libc6-dev but it is not going to be installed
python3-dev : Depends: python3 (= 3.4.2-2) but it is not going to be installed
Depends: libpython3-dev (= 3.4.2-2) but it is not going to be installed
Depends: python3.4-dev (>= 3.4.2-0) but it is not going to be installed
python3-pkg-resources : Depends: python3 (>= 3.1.2-8~) but it is not going to be installed
python3-setuptools : Depends: python3 (>= 3.1.2-8~) but it is not going to be installed
tightvncserver : Depends: libx11-6 but it is not going to be installed
Depends: libxext6 but it is not going to be installed
Depends: perl but it is not going to be installed
Depends: x11-common but it is not going to be installed or
xserver-common but it is not going to be installed
Depends: x11-utils but it is not going to be installed
Depends: xauth but it is not going to be installed
xfonts-base : Depends: xfonts-utils (>= 1:7.5+2) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).