Many times I work on other developers' projects. I need to detect the Python version they used and sometimes it is hard to find.
I want to define which interpreter version I am using inside my project so that future developers will know which one to use.
Is there any standard (acceptable) way to do it, is it README.md?
pyenv has the .python-version file which can be created with:
pyenv local 3.8.0
The file simply contains the string 3.8.0. Users can then enable that specific python version with:
pyenv local
In Python Poetry you can add to your pyproject.toml:
[tool.poetry.dependencies]
python = "~2.7 || ^3.2" # Compatible python versions must be declared here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With