Skip to content

Instantly share code, notes, and snippets.

@joshschmelzle
Last active December 30, 2019 14:59
Show Gist options
  • Save joshschmelzle/e84d3060cc987d3ccb3a141cab9ffbb1 to your computer and use it in GitHub Desktop.
Save joshschmelzle/e84d3060cc987d3ccb3a141cab9ffbb1 to your computer and use it in GitHub Desktop.
python3.8 on wlanpi

Steps to install Python 3.8 on wlanpi.

WLAN Pi build used in this writing (release 1.9.0-beta3b).

Host OS:

Linux wlanpi 4.19.66-sunxi64 #5.93.190815 SMP Thu Aug 15 23:19:53 CEST 2019 aarch64 GNU/Linux

Update before installing python

sudo apt update

Prereqs

Install dependencies, some are already installed.

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

1. Download Python

Get Python from the official Python website. Here is how I did that:

cd ~/ 
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz

2. Install Python 3.8

Extract, cd into Python directory, and install Python 3.8 from source. This will take several minutes.

sudo tar zxf Python-3.8.1.tgz
cd Python-3.8.1/
sudo ./configure
sudo make -j 4
sudo make altinstall

If you want a release build with all stable optimizations active (PGO, etc), please run the following instead of sudo ./configure from the previous list of commands:

./configure --enable-optimizations

3. Check Python installation

Run python3.8 or python3.8 -V

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment