Skip to content
Advertisement

how to update python in raspberry pi

I need python newest version in raspberry pi.
I tried apt install python3 3.8
apt install python3 but this didnot work.
And I also needed to update my raspberry pi python IDLE

Advertisement

Answer

First update the Raspbian.

JavaScript

Then install the prerequisites that will make any further installation of Python and/or packages much smoother.

JavaScript

And then install Python, maybe by downloading a compressed file?

example 1 :

JavaScript

Extract the folder :

JavaScript

Move into the folder :

JavaScript

Initial configuration :

JavaScript

Run the makefile inside the folder with the mentioned parameters :

JavaScript

Run again the makefile this time installing directly the package :

JavaScript

Maybe You already did it but You don’t know how to setup the new version as a default version of the system?

Check first that it has been installed :

JavaScript

Send a strong command to .bashrc telling him who (which version) is in charge of Python

JavaScript

Again! Tell him because .bashrc has to understand! I am joking – You have to source the file so the changes can be applied immediately :

JavaScript

And then check that Your system changed the default version of Python to Python 3.8

JavaScript

The failure depends on many factors : what dependencies are installed, what are the packages added to the source_list.d, some inconvenient coming up during the installation. All may give you more information than you think, just read carefully. Hope it helped.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement