#Preferring virtualenvs
1 messages · Page 1 of 1 (latest)
Likewise.
Explicit vs implicit.
I have a really hard time trusting that magic is always doing what I expect, and what I want.
I assume this thread is about preferring virtual environments over __pypackages__?
yup
I recognize that I could be in a small minority on it, though
doubt it
I think __pypackages__ is just too much magic
and I had bad experiences with package versions in node.js env
I'm working on a website at work, and Node's magic environment behavior really weirded me out at first, even though I knew cognitively what it was doing.
but don't worry, python community made rustenv, rubyenv and nodeenv 🤣
The fact that it doesn't shout at me what env it's monkeying with ... just, nervous-making
I've used npm install instead of npm install -g a bit too often to be able to like that it just goes ahead and creates package.json and node_modules in your current directory
exactly
I also don't have a global pip so I don't know how you would even bootstrap initial __pypackages__ with pip in it to be able to install stuff
Since __pypackages__ does not require you to make a venv first
And if I install pip globally, I'll eventually run pip install outside venv and end up with __pypackages__ folder in cwd or globally installed package I imagine.
Well, I don't know if an implicit creation of that folder was ever in the picture so it's likely not a problem in Python
I think this is why PEP 582 says that you would need to create __pypackages__ as at least an empty directory to signal to an installer that you want it to be used.
I agree, that this significantly decreases the magicness of __pypackages__ , being that it's an explicit opt-in.
But I'd want ,__pypackages__ to be .gitignored, and I know that on multiple occasions over time I would likely forget to create the thing.
Although....does the PEP specify e.g. that it would ignore an e.g. .gitkeep stub file included in the repo to ensure the presence of the subdir?
Though now that I think about it, that would be an awkward .gitignore line to try to write
Oh hey, TIL the !
You can always add __pypackages__ to your global gitignore if you were worried about forgetting to add it per-project