Python
Install and manage Python locally (Windows, macOS, Linux) using official installers, system packages, or pyenv; create virtual environments.
๐งพ Overview
Python is used for bots, APIs, automation, scripting, and data tasks. Local installation allows you to install dependencies and test before deploying to Discloud.
๐ฅ Installation
Download the latest Python 3 installer from https://www.python.org/downloads/
Check "Add Python to PATH" and complete installation.
Reopen terminal and verify
Create optional virtual environment
Dependencies (Debian example):
Install & configure:
Download from python.org and run, then:
โ Verification
If distro uses python3, substitute accordingly.
If your distribution uses python3 invoke that instead of python.
๐ Virtual Environments
What it is: A virtual environment is an isolated directory tree containing its own Python interpreter and installed packages, separate from your global (system) Python.
Why use it:
Keeps project dependencies isolated (one project can use
requests==2.31, anotherrequests==2.29).Avoids needing administrator / system-wide installs.
Prevents accidental conflicts with OS packages or other projects.
Makes
requirements.txtreflect only what the project actually needs (reproducibility when deploying or sharing).Lets you test upgrades safely (create a new env, install, compare behavior).
Create & activate:
Install dependencies & capture versions:
๐ Updating
Upgrade pip
python -m pip install --upgrade pip
Upgrade a package
pip install <name> --upgrade
Install new Python (pyenv)
pyenv install <version>
๐ Common Commands
Last updated