Page 1 of 1

Upgrade Python from 3.5.3 to latest version

Posted: Tue Jan 08, 2019 4:36 am
by RPiTinker
I am using the latest image: 2018-11-13-raspbian-stretch-lite.img. It still has python 3.5.3

Code: Select all

pi@raspberrypi:~ $ python3 --version
Python 3.5.3
I am attempting to use Amazon Alexa Skills, which require python 3.6+

Are there new instructions on how to upgrade python? My own attempts have failed

Code: Select all

/usr/bin/python3: bad interpreter: No such file or directory
These old steps are confusing
viewtopic.php?p=1402804

Re: Upgrade Python from 3.5.3 to latest version

Posted: Tue Jan 08, 2019 7:27 pm
by DougieLawson
What part of python 3.6 does Alexa depend on? Have you tried it with python 3.5 on Raspbian Stretch? Are you able to wait for Raspbian Buster which has frozen with python3 3.7.1-3.

Have you looked at installing the Buster package on your Stretch system? From http://mirrordirector.raspbian.org/rasp ... python3.7/

Re: Upgrade Python from 3.5.3 to latest version

Posted: Tue Jan 08, 2019 8:13 pm
by croston
You could build it from source. I have blogged about it here:
https://www.wyre-it.co.uk/blog/latestpython/

Re: Upgrade Python from 3.5.3 to latest version

Posted: Wed Jan 09, 2019 2:12 pm
by RPiTinker
DougieLawson wrote:
Tue Jan 08, 2019 7:27 pm
What part of python 3.6 does Alexa depend on? Have you tried it with python 3.5 on Raspbian Stretch? Are you able to wait for Raspbian Buster which has frozen with python3 3.7.1-3.

Have you looked at installing the Buster package on your Stretch system? From http://mirrordirector.raspbian.org/rasp ... python3.7/
I don't know what part Alexa Scripts depend on; I only attempted to meet the written prerequisites.
I will attempt python3.5 as 3.7 is a non-starter for me. I'll get 3.7 to function.
When (rough estimate) would Raspbian Buster be available? (I can wait weeks, but not months)

I don't know what to do with the folder for the package.

Re: Upgrade Python from 3.5.3 to latest version

Posted: Wed Jan 09, 2019 2:17 pm
by RPiTinker
croston wrote:
Tue Jan 08, 2019 8:13 pm
You could build it from source. I have blogged about it here:
https://www.wyre-it.co.uk/blog/latestpython/
Your process had fewer dependencies then I had used (older instructions: https://medium.com/@manivannan_data/ins ... d9b4f11e5c).
And you added "--enable-shared" to the ./configure .

(BTW thanks for explaining why in your change log!)

Still not successful - different error. Details on your page.

Re: Upgrade Python from 3.5.3 to latest version

Posted: Wed Jan 09, 2019 2:33 pm
by croston
Sorry - I forgot to add:

Code: Select all

sudo ldconfig
Run that on it's own at a shell prompt and it should work.

Re: Upgrade Python from 3.5.3 to latest version

Posted: Thu Jan 10, 2019 4:01 am
by RPiTinker
croston wrote:
Wed Jan 09, 2019 2:33 pm
add:

Code: Select all

sudo ldconfig
Thank you! now the basics of python3.7.2 work and I can begin the evaluation I initially wanted


(again, details on your page)