.python Version May 2026
.python-version is a simple text file used by version managers
Python 3.9.13
The "Works on My Machine" Trap
Your colleague runs Python 3.10, but you have 3.12 installed. Suddenly, their use of datetime.UTC (new in 3.11) works fine on your machine but fails in CI. A .python-version file eliminates this ambiguity. .python version
The file is not a native feature of Python itself but is recognized by popular third-party managers: The "Works on My Machine" Trap Your colleague