This shows you the differences between two versions of the page.
|
ii:labs:s2:02 [2024/03/17 17:06] florin.stancu |
ii:labs:s2:02 [2026/03/24 16:11] (current) florin.stancu |
||
|---|---|---|---|
| Line 144: | Line 144: | ||
| <code bash> | <code bash> | ||
| # NOTE: choose the most appropriate command: | # NOTE: choose the most appropriate command: | ||
| - | # Option 1: install globally (requires root / admin) | + | # Option 1: install globally (distribution dependent!) |
| - | python3 -m pip install flask | + | apt install python3-flask |
| - | # Option 2: install for the current user only (inside ~/.local/lib/python/ on Linux) | + | # Option 2: install inside virtual environment |
| - | python3 -m pip install --user flask | + | python3 -mvenv .venv |
| - | # (this has the advantage of not polluting the Python's system packages) | + | source .venv/bin/activate |
| - | + | python3 -mpip install flask | |
| - | # there is also the virtual environment way, if you know how to do that ;) | + | |
| </code> | </code> | ||