Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The naming rules for your virtual environments in Python [closed]

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?
like image 661
Michael Avatar asked Apr 14 '26 08:04

Michael


1 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

like image 198
Tzane Avatar answered Apr 16 '26 21:04

Tzane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!