4 Matching Annotations
- May 2022
Pyenv works by adding a special directory called shims in front of your PATH environment variable
How pyenv works
If you are on Linux, you can simply download it from GitHub but the most convenient way is to use the pyenv-installer that is a simple script that will install it automatically on your distro, whatever it is, in the easiest possible way.
Installing pyenv on Linux
- Jul 2021
The goal of this tutorial is to describe Python development ecosystem.
- Install Python through pyenv (don't use python.org)
- Install dependencies with Poetry (miniconda3 is also fine for some cases)
- Write tests with pytest (default testing framework for Poetry)
- Check test coverage with pytest-cov plugin
- Use pre-commit for automatic checks before git commiting (for example, for automatic code refactoring)
- Lint your code with flake8 to easily find bugs (it is not as strict as pylint)
- Format your code with Black so that it looks the same in every project (is consistent)
- Sort imports with isort (so that they are nicely organised: standard library, third party, local)
For Windows, there is pyenv for Windows - https://github.com/pyenv-win/pyenv-win. But you’d probably better off with Windows Subsystem for Linux (WSL), then installing it the Linux way.
You can install pyenv for Windows, but maybe it's better to go the WSL way