.python Version -
Run pyenv local 3.12.0 . This automatically generates the file in your current folder.
When you cd into a directory with this file, managers like pyenv automatically switch your active Python version without you typing anything. Best Practices .python version
# Load pyenv virtualenv or standard venv layout python $(cat .python-version) Run pyenv local 3
: You should typically commit the .python-version file to your Git repository. This ensures that every developer on the team is using the exact same version of Python, reducing "it works on my machine" bugs. .python version