For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

1

Download the latest Python 3 installer from https://www.python.org/downloads/

2

Check "Add Python to PATH" and complete installation.

3

Reopen terminal and verify

4

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, another requests==2.29).

  • Avoids needing administrator / system-wide installs.

  • Prevents accidental conflicts with OS packages or other projects.

  • Makes requirements.txt reflect 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

Task
Command

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