# Installing from source¶

If you are interested in contributing to Matplotlib development, running the latest source code, or just like to build everything yourself, it is not difficult to build Matplotlib from source.

First you need to install the Dependencies.

A C compiler is required. Typically, on Linux, you will need gcc, which should be installed using your distribution's package manager; on macOS, you will need xcode; on Windows, you will need Visual Studio 2015 or later.

The easiest way to get the latest development version to start contributing is to go to the git repository and run:

git clone https://github.com/matplotlib/matplotlib.git


or:

git clone git@github.com:matplotlib/matplotlib.git


If you're developing, it's better to do it in editable mode. The reason why is that pytest's test discovery only works for Matplotlib if installation is done this way. Also, editable mode allows your code changes to be instantly propagated to your library code without reinstalling (though you will have to restart your python process / kernel):

cd matplotlib
python -m pip install -e .


If you're not developing, it can be installed from the source directory with a simple (just replace the last step):

python -m pip install .


To run the tests you will need to install some additional dependencies:

python -m pip install -r requirements/dev/dev-requirements.txt


Then, if you want to update your Matplotlib at any time, just do:

git pull


When you run git pull, if the output shows that only Python files have been updated, you are all set. If C files have changed, you need to run pip install -e . again to compile them.