What an honor to receive a reply from the world renown Dirk. Famous from such wonderful cinematic masterpieces as "RevPi Tutorial 08 – Digital IO Modules"
So what happens when I try to upgrade Python 3 as you did:
Code: Select all
pi@RevPi43323:~ $ sudo apt install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.5.3-1).
I believe this is because Stretch is bundled with the "verified compatible" version Python 3.5
Instead of updating Python 3 from 3.5 to 3.7, I installed Python 3.7 as an alternate installation which solves the problem. I now have Python 3 (3.5) and Pythion 3.7 installed which is fine for me.
These are the steps I've used and documented to install Python 3.7 as an alternate to Python 3. If there is in fact a simpler way to upgrade I would love to know.
1. Start by installing the packages necessary to build Python source:
Code: Select all
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev
2. Download the latest release’s source code from the Python download page using the following curl command :
Code: Select all
curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
3. When download is complete, extract the tarball :
4. Navigate to the Python source directory and run the configure script that will perform a number of checks to make sure all of the dependencies on your system are present Note: The --enable-optimizations option will optimize the Python binary by running multiple tests which will make the build process slower.:
Code: Select all
cd Python-3.7.3
./configure --enable-optimizations
5. Run make to start the build process:
6. Once the build is done install the Python binaries by running the following command as a user with sudo access :