Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidated the Install from Source docs #19155

Merged
merged 5 commits into from Jan 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 23 additions & 1 deletion INSTALL.rst
Expand Up @@ -93,28 +93,50 @@ 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.

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.

.. _xcode: https://guide.macports.org/chunked/installing.html#installing.xcode

The easiest way to get the latest development version to start contributing
is to go to the git `repository <https://github.com/matplotlib/matplotlib>`_
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::
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.

There is more information on :ref:`using git <using-git>` in the developer
docs.

.. warning::

Expand Down
38 changes: 1 addition & 37 deletions doc/faq/installing_faq.rst
Expand Up @@ -155,40 +155,4 @@ picked up by other Pythons. If all these fail, please :ref:`let us know
Install from source
===================

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.

.. _xcode: https://guide.macports.org/chunked/installing.html#installing.xcode

Clone the main source using one of::

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

or::

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

and build and install with::

cd matplotlib
python -mpip install .

If you want to be able to follow the development branch as it changes
just replace the last step with::

python -mpip install -e .

This creates links and installs the command line script in the appropriate
places.

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.

There is more information on :ref:`using git <using-git>` in the developer
docs.
See :ref:`install_from_source`.