Python is a widely used, interpreted high-level programming language, which is in certain ways similar to C++ or Java, but allows more readable and shorter code.
Its key distinction between other programming languages probably is the fact that whitespaces and indentation are used for code block delimitation.
Use the following commands to check if python and pip is installed:
python --version
pip --version
On Windows, there are multiple options to install Python:
Python is available in the Microsoft Store. Open the Python Store Page by running python in your Terminal or going to apps.microsoft.com.
Make sure that the Python application you've selected is by "Python Software Foundation"!
Download the latest 64-bit installation package from python.org.
As long as you do not need special configuration set, just follow the installation dialog boxes using the default settings. Some more insights can be found here.
Since we want to have the
pythoncommand available in Powershell and IDE's, we need to checkAdd python.exe to PATH!
Follow Microsoft's WSL Documentation and continue with the setup for Linux (Ubuntu).
TL/DR:
wsl --install on the command lineInstall Python3 with Homebrew:
brew install python3
Install Python3 with your package manager:
sudo apt install python3 python3-pip # Debian, Ubuntu, Linux Mint
sudo pacman -S python-pip # Arch
sudo dnf install python3 python3-pip # Fedora
In order to get documentation and autocomplete for the commands used to communicate with LEGO® motors and sensors, we need the ev3dev language bindings to be installed.
sudo pip3 install python-ev3dev --break-system-packages
Make sure to install the bindings for version 1.x!
We don't support version 2.x!