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

Programmer Humor

19147 readers
1169 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] 14 points 1 year ago* (last edited 1 year ago) (9 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.

[–] [email protected] 1 points 1 year ago (1 children)

Seconded, after being burned repeatedly I always do this. But why are you calling activate from the directory above?

[–] [email protected] 4 points 1 year ago

I don't think he does. If you're talking about the third line, there's a space between the dots.

The dot command is equivalent to source (running the script in the context of the current shell).

load more comments (7 replies)