5 Matching Annotations
- Sep 2022
-
pythonspeed.com pythonspeed.com
-
So which should you use, pip or Conda? For general Python computing, pip and PyPI are usually fine, and the surrounding tooling tends to be better. For data science or scientific computing, however, Conda’s ability to package third-party libraries, and the centralized infrastructure provided by Conda-Forge, means setup of complex packages will often be easier.
From my experience, I would use Mambaforge or pyenv and Poetry.
Tags
Annotators
URL
-
- May 2022
-
thepythoncorner.com thepythoncorner.com
-
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
-
mitelman.engineering mitelman.engineering
-
The goal of this tutorial is to describe Python development ecosystem.
tl;dr:
INSTALLATION:
- Install Python through pyenv (don't use python.org)
- Install dependencies with Poetry (miniconda3 is also fine for some cases)
TESTING:
- 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)
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
-