Compile/install Python 3.6 on Raspberry Pi and Beaglebone Black

Since Anaconda Python doesn’t currently exist for ARM CPU such as Raspberry Pi or Beaglebone Black, here’s a quick method to compile Python 3.6 yourself.

  1. get prereqs

     sudo apt install libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl
  2. download Python 3.6 source and extract

     wget -P /tmp
     cd /tmp
     unxz Python-3.6*.xz
     cd Python-3.6*
  3. Configure (5 minutes):

  4. Build and install (30 minutes):

     sudo make install

Intel Edison upgrade to Python 3.6

Because the Intel Edison has a 32-bit x86 CPU, you can run Anaconda Python on the Intel Edison instead of compiling Python 3.6 manually.


Why upgrade to Python 3.6? Python 3.6 represents a real milestone, as profound in some ways as Python 3.4. Yet, so many operating systems come with Python 3.4 or 3.5. pathlib being a full standard library is one of my main reasons for using Python 3.6, as well as inline variable string parsing.