This page (revision-22) was last changed on 2022-04-19 01:44 by Murray Altheim

This page was created on 2019-12-21 22:01 by unknown

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
22 2022-04-19 01:44 6 KB Murray Altheim to previous
21 2021-11-29 10:49 6 KB Murray Altheim to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 3 changed one line
See also: [CircuitPython] and [MicroPython]
See also: [CircuitPython] and [MicroPython] and [Upgrading Python|UpgradingPython]
At line 6 removed 31 lines
!! Upgrading to a Newer Version of Python
To upgrade to a newer version of Python, e.g., 3.8.5:
{{{
sudo apt update
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
tar zxf Python-3.8.5.tgz
cd Python-3.8.5
./configure --enable-optimizations
make -j4
sudo make install
}}}
or
{{{
sudo make altinstall
}}}
if you don't want the newly-installed version to be the default. This is an absolute requirement on Ubuntu (for example), as if you replace the default version of Python you __will__ disable/break your OS (e.g., see [How to Install Python 3.8 on Ubuntu|https://tech.serhatteker.com/post/2019-12/how-to-install-python38-on-ubuntu/]). On a Raspberry Pi this isn't so far as I have seen a problem.
In the above directions, replace "3.8.5" above with whatever version you want to install. You can browse the directory of available downloads at: [https://www.python.org/ftp/python]
%%information
You must be patient. On a Pi 4, this can take a long time; on a 3 B+ a very long time. On a Pi Zero basically overnight.
If you're logging into your Pi remotely to do the upgrade, it's interesting to run a second ssh session with {{top}} or {{htop}} running, to watch your Pi's processors working very hard.
%%