by serial_dev · 5y ago · 0 comments
1. Use something that manages virtualenvs + packages for you.
2. Don’t use something that manages virtualenvs + packages for you.
For 1 you have poetry or pipenv. For 2 you have… well virtualenv/pip. It’s really not that complex and I don’t get where this sentiment comes from.
You’ve already listed four separate applications: poetry, pipenv, virtualenv and pip. And if you look online you’ll also find Anaconda and probably several others. For a Python beginner, it’s confusing to try figure out the exact differences between them — let alone what exactly a ‘virtualenv’ is or why you would want to use it.
By comparison, Haskell — a language with a reputation for poor dependency management — has only two competing package managers, and these are practically identical. Most other languages have only one ‘official’ package manager. No wonder people find Python dependency management confusing!
So that’s the base level. You’ve got pip and virtualenv. Everything else builds ontop of that.
But hey it turns out it would be cool to iterate on stuff outside of Python itself. And maybe there are some useful things we can add to pip and virtualenv? And so Poetry and Pipenv are born.
It’s probably Stockholm syndrome but this seems pretty simple.
- pipx
- nix-shell (my current solution)