It's quite handy to create the virtual environment aka venv for a python project in the project folder itself. This means:
.virtualenvsfolder in your home directory with a lot of envs which you will never use again (The one on this computer is 1.2 GB big although I do not work with many Python projects at all(!)). If you are done with a project and delete all local files, the corresponding environment will be gone with it.
Pointing your editor/IDE to the current virtual env as well as deleting it is easy, because it is right there in the project root folder.
As there are many tools in this realm, obviously every one of them handles things a little bit differently and it is the default for none of the popular ones:
Poetry makes it easy for you to express you preference:
poetry config virtualenvs.in-project true
This saves your preference directly to
then looks like this:
[virtualenvs] in-project = true
Conda makes it harder by not having a global switch for this option. Apparently
one has to use the
-p flags instead of