4 ms·
Having three different approaches in the three replies to this comment is just perfect.
by serial_dev 5y ago
Having three different approaches in the three replies to this comment is just perfect.
- burnished 5y agoIt mirrors my own experience. Especially the answer that strives to be condescending, as if you are the only one who is having this problem.
- orf 5y agoIt’s only two, and there are two different approaches you can take: 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.
- bradrn 5y ago> 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!
- orf 5y agoSo just to be clear, Python has one official package manager: pip. It’s built into Python. Both it and virtualenv are part of Python itself, they are not separately installed applications. It’s a bit like saying Rust is confusing because “rustc”, “cargo” and “clippy” are different things. 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.
- uranusjr 5y agoTo be pedantic, Python has exactly zero official package managers. Nothing in packaging is “official” (well maybe distutils is but it’s also officially deprecated).
- faho 5y agoPip ships with the official cpython interpreter, to the point there's even an "ensurepip" module in the standard library to install it if someone ripped it out. There are multiple PEPs about pip. https://www.python.org/dev/peps/pep-0453/ https://www.python.org/dev/peps/pep-0453/ makes it as official as it gets.
- orf 5y agoThat’s not true at all. Pip is official, pyproject is official, the wheel format is also official, etc etc
- uranusjr 5y agoThe latter two are correct (and likely most of your etc.), but pip is not official. pip maintainers only claim it is “PyPA recommended”, and PEP 453 is extremely careful to only say “officially recommended” (by CPython core maintainers). I told you this is pedantic! Source: I am a pip maintainer and a PyPA member.
- orf 5y ago> Source: I am a pip maintainer and a PyPA member. Oh damn, well consider me schooled. Fair enough!
- pid-1 5y ago+ 2 just for fun - pipx - nix-shell (my current solution)