Because of the insanity of python versions, paths, wheels etc and tiredness of spending time getting poetry install to work for project X due to also needing a full rust and c++ toolchain for some dependency etc..
.. I run everything for a project in a container. Each project then matches perfectly the container actually used in production, so if it works there, it also works on my machine. I just volume mount the project folder into the container so I can't edit files from my IDE, and then pycharm has ok support for remote interpreters.
The sheer amount of wasted time is hard to comprehend. How many man-hounrs or rather man-centuries have we spent trying to make python fast and trying to install it?. We just keep on polishing that turd.
Not tried pipenv, I'm a bit tied by what the company uses.
I did try using something similar to asdf (can't remember the name, think it changed), but it still didn't really solve the problem of OS dependencies and things needing to be compiled, and the problems arising from me not running the same OS as the application would run on. A dockerfile solves that, my system is a carbon copy of the prod environment.
We do, and they are pretty cool but incredible limited.
For one, you have to limit yourself to vscode and/or other IDEs with this capability - which ought to be a dealbreaker right there.
But then you still have issues around syncing permissions and paths inside+outside the environment. And that all your other windows have a different view into your project.
That alone is another dealbreaker (which you can bandaid, but...).
And then if you need access to USB devices, well for one I hope you are running linux but even then that is a frigging nightmare. And there is some headache balancing everything above with admin rights etc.
Yes in theory it is perfect. In practice we are not nearly there and you quickly realize the effort to do this well is orders of magnitude more work than just running native.
I still always have a container for continuous integration in a way that you can run it easily on your workstation and can be turned into a devcontainer and/or built manually for small fixes in an old project you haven't used in a long long time. Which is great!
But for your main development? I really tried but it is a nightmare in disguise.
Why not VMs? With the kind of computers dev have, I'd think it be trivial to have a VM dedicated to one project (unless you're doing gpu). This means I don't have tooling associated to projects (databases, webserver) populating the main env, only personal stuff.
Yeah. IMO, you don’t need to go very far into OS-level dependencies before it just makes more sense to use Docker. asdf et al can try to smooth the experience out all they want, and they certainly make things better, but unless your developer machines are REALLY standardised, it’s really building a castle on sand.
Whish there were some CLI to speed up this process actually. Just cd:ing into a folder should pull everything down for you to run iex/irb/node/etc as if it was native but running through the container.
this makes me itchy, pulling the whole internet without looking into your development machine sounds like a very bad idea. It's the equivalent of an IDE's "do you trust this project" but on steroids.
.. I run everything for a project in a container. Each project then matches perfectly the container actually used in production, so if it works there, it also works on my machine. I just volume mount the project folder into the container so I can't edit files from my IDE, and then pycharm has ok support for remote interpreters.