Part 7 - Venvs folder structures
Part 7 - Venvs folder structures
I ran a command and there was a huge tree. I have no idea what I'm doing anymore but I used pip list. I've just learned that there are some other packages installed by default too. The tutorial lists them nicely. Aha! It says here:
"YOUR VIRTUAL ENVIRONMENT IS JUST A FOLDER STRUCTURE, WHICH MEANS THAT YOU CAN DELETE AND RE-CREATE IT ANY TIME YOU WANT. Can confirm - the amount of times I have been told to nuke my virtual enviornment as a solution
Have just been obscene
This tutorial says:
But why this specific folder structure, and what does this structure make possible?
Oh Jesus Christ almighty. I have never been so last as this before. Let's keep on going.
"An Isolated Python Installation"
"Python virtual environments aim to provide a lightweight, isolated Python environment that you can quickly create and then discard when you don't need it anymore." That makes sense.
"The folder structure that you just explored makes that possible by providing three key pieces:"
- A copy or symlink of the Python library
- A pyenv.cfg file
- A site-packages directory
"You want to achieve an isolated environment so that any external packages you install won't conflict with global site-packages."
- "To make this possible, venv reproduces the folder structure that a standard Python installation creates."
- "This structure accounds for the location of the compy or symlink of the Python binary and the site-packages directory, where Python installs external packages."
Oh Jesus Christ almighty. That sounds very hard indeed. Well it's 6 pm

Comments
Post a Comment