#Preferring virtualenvs

1 messages · Page 1 of 1 (latest)

cosmic kindle
#

Likewise.

Explicit vs implicit.

I have a really hard time trusting that magic is always doing what I expect, and what I want.

strong orchid
#

I assume this thread is about preferring virtual environments over __pypackages__?

jovial nexus
#

yup

cosmic kindle
#

I recognize that I could be in a small minority on it, though

jovial nexus
#

doubt it

#

I think __pypackages__ is just too much magic

#

and I had bad experiences with package versions in node.js env

cosmic kindle
#

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.

jovial nexus
#

but don't worry, python community made rustenv, rubyenv and nodeenv 🤣

cosmic kindle
#

The fact that it doesn't shout at me what env it's monkeying with ... just, nervous-making

dusk hazel
#

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

jovial nexus
#

exactly

dusk hazel
#

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

strong orchid
cosmic kindle
#

Though now that I think about it, that would be an awkward .gitignore line to try to write

#

Oh hey, TIL the !

strong orchid
#

You can always add __pypackages__ to your global gitignore if you were worried about forgetting to add it per-project

cosmic kindle
#

I think I'd want __pypackages__ to be tracked in the repo, so that it's automatically created on clone. As long as putting it in global gitignore would allow that, it should work.

#

(Motivation there being to simplify both contributors' and my experience.)

dusk hazel
#

You can put a .gitignore file inside __pypackages__

#
*
!.gitignore