Python
The version of Python that comes pre-installed on Raspberry Pi OS is the latest stable version of Python 3. To determine which version of Python is installed on your Pi distribution, open the Terminal window and type python3 --version. Our projects will work with anything higher than Python 3.5, though Python 3.7 or higher is preferred.
For example, on the version of Raspberry Pi OS running on my Pi 4, the version of Python running on it is 3.7.3:
$ python3 --version Python 3.7.3
Be sure to run python3, not python. The single python refers to the older Python 2.7 release that’s included in the distribution to support older application dependencies that have not yet updated their libraries to the Python 3 interpreter.
The Python 3 distribution ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access