by idoubtit · 7y ago · 0 comments
For example, this "simple, lightweight" program has dependencies, as one can see in its .travis.yaml file. That's why the readme has the command `pip install commonmark` (plus more dependencies for dev). But, wait, doesn't `pip` install as root in /usr/local/ by default? (BTW, the documentation of `pip install` is mute on the subject.) So I should use pipenv, but last time I tried it was broken and the ticket had low activity. So virtualenv + pip, but it's a mess since I like using many terminals. I've heard about poetry, but that's not standard at all...
Virtualenv is usually excessive unless you have to handle lots of version problems
Just pip install to the location you choose. sudo or —user is fine 99% of the time. Venvs are only needed for big work projects.
apt install python3 virtualenv
virtualenv env
. env/bin/activate
pip install -r requirements.txt
Done. And then with fabric you can automate deployments in a few lines of codes !The happy case works, it always does. The problem is in the edge cases and the exceptions. This probably goes for the bulk of all software.