Setup Python Environment
It is good practice today to use a virtual environment for python projects. For working with the examples and tutorials I highly recommend to setup an appropriate environment. With the most tools this is a matter of minutes.
Linux
-
Install the system package for creating the virtual environment (we will use venv here). Execute the following command in the terminal: Debian/Ubuntu:
sudo apt install python3-venv
Fedora:sudo dnf install python3-venv
-
Create a project folder and navigate inside:
- Create the Virtual Environment (located in the folder .venv) and activate it:
- Install the packages required for the most examples:
- Open an IDE or code editor of your preference. In the tutorials I use most of the time VS Code, which can be downloaded here: https://code.visualstudio.com/Download
Windows
Install VS Code and the Python Plugin
Install Python >= 3.11 from Windows Store