Python virtual env cheat sheet
Will Sheppard

Will Sheppard @zaphoddont

Joined:
Aug 30, 2024

Python virtual env cheat sheet

Publish Date: Feb 19
0 0

This is one way to do it, probably sub-optimal.

Setup

python3.6 -m venv venv
source ./venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

Common

(venv) pip install --upgrade pip
Enter fullscreen mode Exit fullscreen mode

Standard

(venv) pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Optional for poetry

(venv) python -m pip install poetry pip -U
(venv) poetry update
(venv) poetry install
(venv) source .venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

Teardown

deactivate
Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment