To install Python 3.9 on Ubuntu:
Always include this file in your version control so your team and CI/CD pipelines stay in sync.
: 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.
Place a .python-version file in each subproject's root. Tools that climb the directory tree will find the correct one.
# Install Python 3.10 using pyenv pyenv install 3.10.0