4 ms·
> You create a venv or bundle Here’s your dumpster fire. I can’t figure out why this crappy venv thing has to exist in Python when it doesn’t exist anywhere el
by thiht 4y ago
> You create a venv or bundle
Here’s your dumpster fire. I can’t figure out why this crappy venv thing has to exist in Python when it doesn’t exist anywhere else.
- ochronus 4y agoWhat's crappy about virtualenvs?
- PaulHoule 4y agoThey get the environment under control and remove the excuses that some Python ‘programmers’ have for always getting the job 80% done.
- agumonkey 4y agoIt's really not special. Having a dedicated ~isolated space for a dependency graph is normal. Better than overwriting global libs.
- zimpenfish 4y ago> this crappy venv thing has to exist in Python when it doesn’t exist anywhere else. Well, there's RVM[1] for Ruby, maven-env[2] for maven, and perl5-virtualenv[3] for Perl. [1] https://rvm.io https://rvm.io [2] https://github.com/AlejandroRivera/maven-env https://github.com/AlejandroRivera/maven-env [3] https://github.com/orkunkaraduman/perl5-virtualenv https://github.com/orkunkaraduman/perl5-virtualenv
- rcarmo 4y agoActually, it does. You can do the same in Java, Go, and plenty of other languages. Pretty much every language I’ve used has a way to have multiple runtimes/environments coexist on the same machine, referred to by PATH tweaks or specific environment variables.
- thiht 4y ago> You can Yes. In Python it seems like you have to, or it just doesn't seem to work.
- rcarmo 4y agoWell, that’s not my experience. And you’re welcome to read the rest of the comments from folk who share this viewpoint.
- PaulHoule 4y agoIn other languages people use the facility equivalent to venv like the way most people breathe. Pythoners have a sense of entitlement that they can just install everything into one big pot and it will all work. Python barely survived becoming an important language on the Linux platform because once the sense of entitlement of ‘just type Python’ made the migration to Python 3 take 10 years instead of 3. Before Docker came along I would frequently have multiple installations of customer software running on machines, so long as you can set the file system paths and database connections it ‘just works’. But people didn’t have the discipline to this so we got Docker to turn the whole morning into one big coffee break.
- theonemind 4y ago> In other languages people use the facility equivalent to venv like the way most people breathe. > Pythoners have a sense of entitlement that they can just install everything into one big pot and it will all work. Perl has really high backwards compatibility. I've never used anything like a venv with perl (although you can) and never had any problems, and I just install everything into one big pot and it all works. It just seems like a cultural issue with Python.
- fxtentacle 4y agoApparently, you're new to back-end programming? We have similar "locally installed package" abstractions in every major language there: C++ -> vcpkg Ruby -> bundler Node -> npm vendor Go -> Go Modules Java -> Maven If you disagree, please explain how Ruby's bundler caching dependencies in a vendor subfolder differs from Python's venv caching dependencies in a subfolder and why one of them is a dumpster fire that and the other one doesn't exist.
- thiht 4y ago> Node -> npm vendor > Go -> Go Modules These are transparent though. You don't need to "activate" your venv when you enter your project's directory. You can't misuse it. You can't fuck up everything because you switched project and forgot to change the venv. For Go you don't even need gvm or anything like that because of the compatibility promise. Just use the latest and be done with it.
- PaulHoule 4y agoWhen I have been doing analysis work I typically create a suite of command line programs to do that work with. Systems like nom and maven lock me in a prison because they are dependent on the directory I am in…. They take away the ability to cd to an arbitrary directory and run my command line programs. I can’t see why people want to take the X out of Unix like that, maybe they remember using CP/M and never really figured out cd and mkdir and they want to bring us all to their level. With a .venv however the program suite I am running and directory I am are decoupled and I can breathe free.
- potta_coffee 4y agoGo modules and NPM are easy to use. Virtualenvs are a pain in the ass to configure. That's the difference really. If I could just go to my Python project directory and "virtualenv init" then this wouldn't be a conversation topic.