Hacker News new | ask | show | jobs
by hprotagonist 2104 days ago
the position the author takes is "i've never heard of `venv` so i'll do these other terrible 5 hacks instead".

$HOME or not is a red herring, i apologize if it appears more salient than it really was meant to be.

1 comments

> the position the author takes is "i've never heard of `venv` so i'll do these other terrible 5 hacks instead".

No, it's "I don't need the full power of venv so I'll just put the code in a specific directory now that I've figured out how to tell pip to do that when it's not a user's home directory". Using pip install's "--target" option hardly qualifies as a "terrible hack". The designers put it there because there were valid use cases for it. Setting environment variables before running a program is hardly a "terrible hack" either; it's one of the most common uses for shell scripts.

> $HOME or not is a red herring

If all you meant by it is "put the code in any directory you like", then, as I said, that's exactly what the author did.