6 ms·
Every time I get the urge to pick up Python, I find the packaging situation so off putting that I quickly find some other rabbit hole to dive into. I find emacs
by blame-troi 4y ago
Every time I get the urge to pick up Python, I find the packaging situation so off putting that I quickly find some other rabbit hole to dive into. I find emacs and vim add on configuration easy and transparent by comparison.
- hodgesrm 4y agoExactly the same thing happened to me recently. I found refuge in Golang. Not my favorite language but it's tough to beat for utilities that you want to distribute quickly.
- nonethewiser 4y agoFor all the shit node gets for being too dependency heavy, npm, yarn, pnpm all work exactly how I’d expect.
- hodgesrm 4y agoI love npm. It actually works. ;)
- noloblo 4y agoNot to mention golang sub second compile time and all the productivity boosts coming from that
- pjmlp 4y agoHardly impressive for anyone that has used compiled languages with modules since the 1980's. What is impressive, is how so many in the industry have forgotten about them.
- noloblo 3y agoWith all these years of improving compile times why is haskell compiled time very slow still?
- hodgesrm 4y agoIncremental compilation has been a thing since the days of Smalltalk. (At least.) It's a feature of every Java IDE I've ever used. I do appreciate quick Golang builds but being able to change something in an IDE and see instantly if it compiles is a big plus of many lanugage.s
- nonethewiser 4y agoInstall dependency. Save in requirements.txt. Includes sub dependencies that are system specific. Install from requirements.txt on different machine and get errors. Uninstall dependency and save to requirements.txt. Look at requirements.txt and see that sub decencies are still there. What is the right way to avoid these issues on Python?
- mikepurvis 4y agoSpecify your actual dependencies only in setup.py/cfg and only ever write your requirements file from pip freeze. Or junk all this and just use poetry, which manages both the abstract dependencies (pyproject.toml) and concrete ones (poetry.lock).
- jakewins 4y agoPoetry seems to solve the dependency spec part, both for libraries that need to ship specs for supported version ranges of dependencies and apps that ship lock files. However: poetry still falls short in managing the python runtime, I am continuously having to divert time to help our data scientists untangle the messes poetry makes with virtualenvs and their local python setups. Also, they broke backwards compat on the lock file format? So now devs running newer poetry versions break projects for devs on older versions because the lock files aren’t compatible?!
- mikepurvis 4y agoYes, I was very upset about the lockfile format change when we hit that; seemed like a very shortsighted thing to have done, but I guess I don't know the actual motivations or what was being achieved with it.
- jwestbury 4y agoUse pipreqs instead of pip freeze. It resolves the minimal set of dependencies for your package.
- Fradow 4y ago
- andrewflnr 4y agoAs OP suggests, you can ignore basically all of it. If you're just messing around, use your system Python. That'll get you a long way. If you're Starting A Project and want to install packages locally, use the virtualenv package that came with your system Python. That's gotten me through basically all my Python programming for 15 years. Anything more complicated than that, you can learn when you come to it.
- dns_snek 4y ago> If you're Starting A Project and want to install packages locally, use the virtualenv package that came with your system Python. I think this should be emphasized more, I don't think it's just a matter of preference, not separating packages between projects using virtualenvs will land you in a world of hurt as soon as you want to update or uninstall any of them and they're hopelessly entangled with system packages and other projects.
- andrewflnr 4y agoIf you're just starting with the language though, you might only have one project for a long time, or your projects might have disjoint dependencies (or close enough; I'm imagining someone with both a Django and pygame project). And you can learn a lot without any libraries at all. As a teen, I went a couple years and learned a lot before I learned how to use virtualenv. You'll want it sooner, but it absolutely shouldn't be a barrier to getting your feet wet.
- dns_snek 4y agoThat's certainly valid, if someone is just getting started like you say then it's not something they should worry about. I wasn't thinking of complete beginners when I wrote that comment.
- nerpderp82 4y ago> use your system Python. Maybe you are an accidental accelerationist? Using the system Python is fastest way to a broken system and a broken Python.
- influx 4y agoI use docker and just use pip install requirements.txt. Been working well for me.