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