The naming rules for your virtual environments in python

Question:

I’m looking for some sort of naming scheme for my virtual environments.
How do you usually name them? Is there naming convention for python virtual environments?

Asked By: Michael

||

Answers:

If you are storing your environment inside the project folder some common names are env, venv, .env, .venv, but besides that, I don’t think there are any common conventions.

The official docs.python.org’s tutorial on venv also suggests using .venv as the name.

A common directory location for a virtual environment is .venv.

This name keeps the directory typically hidden in your shell and thus
out of the way while giving it a name that explains why the directory
exists.

It also prevents clashing with .env environment variable
definition files that some tooling supports.

docs.python.org/3/tutorial/venv.html

Answered By: Tzane