Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC refactored installation instruction #8240

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

Merged
merged 13 commits into from
Mar 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak phrasing of install instructions.
  • Loading branch information
QuLogic authored and NelleV committed Mar 20, 2017
commit 86be6848d284d0fe320ebb7ff1c08d376cb17956
55 changes: 27 additions & 28 deletions 55 INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ Installing
:ref:`install the latest development version<install_from_source>`.



.. contents..
.. contents..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should. It is really strange that it compiled properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turned into a comment (which explains the colour on GitHub now.)


Installing an official release
==============================

Matplotlib and most of its dependencies arr all available as wheel packages for
Matplotlib and most of its dependencies are all available as wheel packages for
macOS, Windows and Linux distributions::

pip install -U matplotlib
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true for linux and osx, but it'd be nice to check for windows!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest python -m pip ... consistently as below (also because it helps in presence of venvs if your path is slightly messed up).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not going to change this, as this is non standard and I don't think it is a good idea to promote unconventional way to do steps such as using pip.
Feel free to open a PR once this one is merged.



Third-party distributions of Matplotlib
=======================================

Expand Down Expand Up @@ -101,9 +101,9 @@ To run the test suite:

GTK3 is not supported on Windows.

For support for other backend, LaTeX rendering, animation input/output and
larger selection of file format, you may need to install `additional
dependencies <_install_requirements>`.
For support for other backends, LaTeX rendering, animation input/output and
a larger selection of file formats, you may need to install `additional
dependencies <_install_requirements>`_.


.. _install_from_source:
Expand Down Expand Up @@ -147,7 +147,7 @@ packaging Matplotlib.
If you have installed prerequisites to nonstandard places and need to
inform Matplotlib where they are, edit ``setupext.py`` and add the base
dirs to the ``basedir`` dictionary entry for your ``sys.platform``;
e.g., if the header to some required library is in
e.g., if the header of some required library is in
``/some/path/include/someheader.h``, put ``/some/path`` in the
``basedir`` list for your platform.

Expand All @@ -161,7 +161,7 @@ Matplotlib requires a large number of dependencies:
* `Python <https://www.python.org/downloads/>`_ (>= 2.7 or >= 3.4)
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
* `dateutil` (>= 1.1)
* dateutil (>= 1.1)
* `pyparsing <https://pyparsing.wikispaces.com/>`__
* `libpng <http://www.libpng.org>`__ (>= 1.2)
* `pytz <http://pytz.sourceforge.net/>`__
Expand All @@ -173,39 +173,38 @@ Matplotlib requires a large number of dependencies:
* `subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_ (for Python
2.7 only, on Linux and macOS only)

Optionally, you can also install a number of packages to enables better user
interface toolkit. See :ref:`what-is-a-backend` for more details on the
Optionally, you can also install a number of packages to enable better user
interface toolkits. See :ref:`what-is-a-backend` for more details on the
optional Matplotlib backends and the capabilities they provide.

* :term:`tk` (>= 8.3, != 8.6.0 or 8.6.1): for the TkAgg backend;
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4): for the Qt4Agg backend;
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5Agg backend;
* :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend;
* :term:`wxpython` (>= 2.8 or later): for the WX or WXAgg backend;
* `pycairo <https://pypi.python.org/pypi/pycairo>`_: for GTK3Cairo;
* `PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
* `Tornado <https://pypi.python.org/pypi/tornado>`_: for the WebAgg backend.

For better support of animation output format and image file formats, LaTeX,
etc you can
install the following:
etc., you can install the following:

* `ffmpeg <https://www.ffmpeg.org/>`__/`avconv
<https://libav.org/avconv.html>`__ or `mencoder
<https://mplayerhq.hu/design7/news.html>`__ (for saving movies);
* `ImageMagick <https://www.imagemagick.org/script/index.php>`__ (for saving
animated gifs);
* `Pillow <https://python-pillow.org/>`__ (for a larger selection of image
file format: JPEG, BMP, and TIFF image files);
file formats: JPEG, BMP, and TIFF image files);
* `LaTeX <https://miktex.org/>`_ and `GhostScript <https://ghostscript.com/download/>`_
(for rendering text with LaTeX);

.. note::

Matplotlib depends on a large number of non-Python libraries.
`pkg-config <https://www.freedesktop.org/wiki/Software/pkg-config/>`__
can be used to find required non-Python libraries and thus make install go
more smoothly if the libraries and headers are not in the expected
can be used to find required non-Python libraries and thus make the install
go more smoothly if the libraries and headers are not in the expected
locations.

.. note::
Expand Down Expand Up @@ -238,7 +237,7 @@ Matplotlib by first installing ``yum-builddep`` and then running::

su -c "yum-builddep python-matplotlib"

This does not build Matplotlib, but it does get and install the
These commands do not build Matplotlib, but instead get and install the
build dependencies, which will make building from source easier.


Expand All @@ -249,28 +248,28 @@ Building on macOS

The build situation on macOS is complicated by the various places one
can get the libpng and FreeType requirements (MacPorts, Fink,
/usr/X11R6) and the different architectures (e.g., x86, ppc, universal),
the different macOS version (e.g., 10.4 and 10.5). We recommend that you build
/usr/X11R6), the different architectures (e.g., x86, ppc, universal), and
the different macOS versions (e.g., 10.4 and 10.5). We recommend that you build
the way we do for the macOS release: get the source from the tarball or the
git repository and install the required dependencies through a third-party
package manager. Two widely used package managers are Homebrew, and MacPorts.
The following example illustrates how to install libpng and FreeType using
brew::
``brew``::

brew install libpng freetype pkg-config

If you are using MacPorts, execute the following instead::

port install libpng freetype pkgconfig

To install Matplotlib from source, execute::
After installing the above requirements, install Matplotlib from source by
executing::

python setup.py install


Note that your environment is somewhat important. Some conda users have
found that, to run the tests, their PYTHONPATH must include
/path/to/anaconda/.../site-packages and their DYLD_FALLBACK_LIBRARY_PATH
Note that your environment is somewhat important. Some conda users have
found that, to run the tests, their PYTHONPATH must include
/path/to/anaconda/.../site-packages and their DYLD_FALLBACK_LIBRARY_PATH
must include /path/to/anaconda/lib.


Expand Down Expand Up @@ -304,7 +303,7 @@ install.

The commands below assume that you can compile a native Python lib for the Python version of your
choice. See `this howto <https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/>`_
how to install and setup such environments. If in doubt: use Python >= 3.5 as it mostly works
for how to install and setup such environments. If in doubt: use Python >= 3.5 as it mostly works
without fiddling with environment variables::

# create a new environment with the required packages
Expand Down Expand Up @@ -332,7 +331,7 @@ without fiddling with environment variables::
python setup.py bdist_wheel

The `build_alllocal.cmd` script in the root folder automates these steps if
you already created and activated the conda environment.
you have already created and activated the conda environment.


Conda packages
Expand Down
4 changes: 2 additions & 2 deletions 4 README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Matplotlib
Matplotlib is a Python 2D plotting library which produces publication-quality
figures in a variety of hardcopy formats and interactive environments across
platforms. Matplotlib can be used in Python scripts, the Python and IPython
shell (ala MATLAB or Mathematica), web application servers, and various
shell (à la MATLAB or Mathematica), web application servers, and various
graphical user interface toolkits.

`Home page <http://matplotlib.org/>`_

Installation
=============
============

For installation instructions and requirements, see the INSTALL file or the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it called INSTALL.rst in this PR now?

`install <http://matplotlib.org/users/installing.html>`_ documentation. If you
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.