.. title: Installation Guide .. slug: installation-guide .. date: 2015-11-24 09:38:23 UTC .. tags: installation .. category: .. link: .. description: .. type: text Dependencies ------------ **Colour** requires various dependencies in order to run and follows the `minimum supported versions `__ as given by `Scientific Python `__. Depending on your intended use case, i.e. using or developing, you may not need to install all of them. Please refer to the `Installation Methods for Using Colour`_ and `Installation Methods for Developing Colour`_ sections below. Primary Dependencies ^^^^^^^^^^^^^^^^^^^^ - `python >= 3.9, < 3.13 `__ - `imageio >= 2, < 3 `__ - `numpy >= 1.22, < 2 `__ - `scipy >= 1.8, < 2 `__ - `typing-extensions >= 4, < 5 `__ Optional, Meshing and Plotting Dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - `graphviz >= 2, < 3 `__ - `matplotlib >= 3.5, != 3.5.0, != 3.5.1 `__ - `networkx >= 2.7, < 3 `__ - `opencolorio >= 2, < 3 `__ - `openimageio >= 2, < 3 `__ - `pandas >= 1.4, < 2 `__ - `pygraphviz >= 1, < 2 `__ - `tqdm >= 4, < 5 `__ - `trimesh >= 3, < 4 `__ - `xxhash >= 3.2, < 4 `__ Development Dependencies ^^^^^^^^^^^^^^^^^^^^^^^^ - `biblib-simple `__ - `coverage `__ - `coveralls `__ - `invoke `__ - `jupyter `__ - `pre-commit `__ - `pyright `__ - `pydata-sphinx-theme `__ - `pytest `__ - `pytest-cov `__ - `pytest-xdist `__ - `restructuredtext-lint `__ - `sphinx `__ - `sphinxcontrib-bibtex `__ - `toml `__ - `twine `__ Installation Methods for Using Colour ------------------------------------- Pypi ^^^^ **Colour** can be easily installed from the `Python Package Index `__ by issuing this command in a shell: .. code:: shell pip install --user colour-science This *asciicast* demonstrates how to generate a pristine Python *VirtualEnv* environment for Colour: .. raw:: html The optional features dependencies are installed as follows: .. code:: shell pip install --user 'colour-science[optional]' The development dependencies are installed as follows: .. code:: shell pip install --user 'colour-science[development]' The graphviz figure plotting dependencies are installed as follows: .. class:: alert alert-dismissible alert-info | **Note** | | `Graphviz `__ might need to be installed beforehand, please refer to the specific section for your platform on the `Graphviz download page `__. pip install --user 'colour-science[graphviz]' The meshing dependencies for gamut computations are installed as follows: .. code:: shell pip install --user 'colour-science[meshing]' If you wish to read *OpenEXR* files, you will need to install the *FreeImage* plugin for `Imageio `__ as follows: .. code:: shell python -c "import imageio;imageio.plugins.freeimage.download()" Continuum Analytics Anaconda ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **Colour** is also available for `Anaconda `__ from *Continuum Analytics* via `conda-forge `__: .. code:: shell conda install -c conda-forge colour-science This *asciicast* demonstrates how to generate a pristine Python *conda* environment for Colour: .. raw:: html Github ^^^^^^ Alternatively, you can also install directly from `Github `__ source repository: .. code:: shell git clone git://github.com/colour-science/colour.git cd colour pip install --user . Installation Methods for Developing Colour ------------------------------------------ .. class:: alert alert-dismissible alert-info | **Note** | | If you are on macOS, a dedicated guide on how to setup your environment is available here: `Setting Up the Development Environment on macOS <../setting-up-the-development-environment-on-macos/index.html>`__. Poetry ^^^^^^ **Colour** adopts `Poetry `__ to help managing its dependencies, this is the recommended way to get started with **Colour** development. Assuming `python >= 3.8, < 3.11 `__ is available on your system, the development dependencies are installed with `Poetry `__ as follows: .. code:: shell git clone git://github.com/colour-science/colour.git cd colour poetry install --with dev,graphviz,meshing,optional If `Graphviz `__ is available on your system, you might issue the following commands instead of the aforementioned ones: .. code:: shell git clone git://github.com/colour-science/colour.git cd colour poetry install --with dev,graphviz,meshing,optional Those commands will create a Virtual Environment in which all the required python packages will be installed. Tools can then be run as follows: .. code:: shell poetry run invoke -l or alternatively: .. code:: shell source $(poetry env info -p)/bin/activate invoke -l Vagrant ^^^^^^^ An easy way to get all the pre-requisites at once is to use our `colour-vagrant `__ environment for `Vagrant `__. Please refer to the dedicated blog post for more details about its deployment: `PyCharm, Vagrant, Ansible & Poetry `__