this post was submitted on 29 Jun 2023
406 points (97.9% liked)

Programmer Humor

19310 readers
2163 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 17 points 1 year ago* (last edited 1 year ago) (10 children)

My workflow:

cd project
python -m venv .venv
. ./.venv/bin/activate
pip install -e .

By default pyvenv excludes system packages, so I can have different versions in the venv. To reset the venv, I just have to delete the .venv dir.

[โ€“] LemmyEnjoyer99 3 points 1 year ago

I use pipenv and the workflow is essentially the same.

cd project
mkdir .venv
python3 -m pipenv shell
pipenv install --dev

It's also nice because VScode (or VSCodium if you're based), automatically detects it to set as your venv.

load more comments (9 replies)