Albumentations requires Python 3.6 or higher.
Install the latest stable version from PyPI¶
pip install -U albumentations
Install the latest version from the master branch on GitHub¶
pip install -U git+https://github.com/albumentations-team/albumentations
Note on OpenCV dependencies¶
By default, pip downloads a wheel distribution of Albumentations. This distribution has
opencv-python-headless as its dependency.
If you already have some OpenCV distribution (such as
opencv-contrib-python-headless) installed in your Python environment, you can force Albumentations to use it by providing the
--no-binary qudida,albumentations argument to pip, e.g.
pip install -U albumentations --no-binary qudida,albumentations
pip will use the following logic to determine the required OpenCV distribution:
- If your Python environment already contains
opencv-python-headlesspip will use it.
- If your Python environment doesn't contain any OpenCV distribution from step 1, pip will download
Install the latest stable version from conda-forge¶
If you are using Anaconda or Miniconda you can install Albumentations from conda-forge:
conda install -c conda-forge imgaug conda install -c conda-forge albumentations