Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Updates for Windows #6508

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 5 commits into from
Jun 6, 2016
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 35 additions & 45 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.. The source of this document is INSTALL. During the doc build process,
.. this file is copied over to doc/users/installing.rst.
.. Therefore, you must edit INSTALL, *not* doc/users/installing.rst!
.. _pip: https://pypi.python.org/pypi/pip/

**********
Installing
Expand All @@ -21,14 +22,12 @@ Most platforms : scientific Python distributions
The first option is to use one of the pre-packaged python
distributions that already provide matplotlib built-in. The
Continuum.io Python distribution (`Anaconda
<https://store.continuum.io/cshop/anaconda/>`_ or `miniconda
<https://www.continuum.io/downloads/>`_ or `miniconda
<http://conda.pydata.org/miniconda.html>`_) and the Enthought
distribution `(Canopy) <https://www.enthought.com/products/canopy/>`_
are both excellent choices that "just work" out of the box for
Windows, OSX and common Linux platforms. Both of these distributions
include matplotlib and *lots* of other useful tools. Another
excellent alternative for Windows users is `Python (x, y)
<https://code.google.com/p/pythonxy>`_ .
include matplotlib and *lots* of other useful tools.


Linux : using your package manager
Expand All @@ -44,43 +43,36 @@ Mac OSX : using pip
-------------------

If you are on Mac OSX you can probably install matplotlib binaries using the
standard Python installation program `pip <https://pypi.python.org/pypi/pip>`_.
standard Python installation program pip_.
See :ref:`install_osx_binaries`.

.. _installing_windows:

Windows
-------

If you don't already have Python installed, we recommend using
one of the `scipy-stack compatible Python distributions
<http://www.scipy.org/install.html>`_ such as WinPython, Python(x,y),
Enthought Canopy, or Continuum Anaconda, which have matplotlib and
many of its dependencies, plus other useful packages, preinstalled.

For `standard Python <http://www.python.org/download/>`_ installations
you will also need to install compatible versions of
`setuptools <https://pypi.python.org/pypi/setuptools/>`_,
`numpy <https://pypi.python.org/pypi/numpy/>`_,
`python-dateutil <https://pypi.python.org/pypi/python-dateutil/>`_,
`pytz <https://pypi.python.org/pypi/pytz>`_,
`pyparsing <https://pypi.python.org/pypi/pyparsing/>`_, and
`cycler <https://pypi.python.org/pypi/Cycler>`_
in addition to
`matplotlib <http://pypi.python.org/pypi/matplotlib/>`_.

For Python 3.5 the `Visual C++ Redistributable for Visual Studio 2015
<http://www.microsoft.com/en-us/download/details.aspx?id=48145>`_
needs to be installed.
In case Python 2.7 to 3.4 are not installed for all users (not the default),
Enthought Canopy, or Continuum Anaconda, which have matplotlib and many
of its dependencies, plus other useful packages, preinstalled.

For `standard Python <https://www.python.org/download/>`_ installations,
install matplotlib using pip_::

python -m pip install -U pip setuptools
Copy link
Member

Choose a reason for hiding this comment

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

do you still need to update setuptools for a straight matplotlib install?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Older Python 2.7 versions may not have setuptools installed.

python -m pip install matplotlib

In case Python 2.7 or 3.4 are not installed for all users,
the Microsoft Visual C++ 2008 (
`64 bit <http://www.microsoft.com/download/en/details.aspx?id=15336>`__
or
`32 bit <http://www.microsoft.com/download/en/details.aspx?id=29>`__
for Python 2.7 to 3.2) or Microsoft Visual C++ 2010 (
for Python 2.7) or Microsoft Visual C++ 2010 (
`64 bit <http://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
or
`32 bit <http://www.microsoft.com/en-us/download/details.aspx?id=5555>`__
for Python 3.3 and 3.4) redistributable packages need to be installed.
for Python 3.4) redistributable packages need to be installed.

Matplotlib depends on `Pillow <https://pypi.python.org/pypi/Pillow>`_
for reading and saving JPEG, BMP, and TIFF image files.
Expand All @@ -105,22 +97,23 @@ For other backends you may need to install
or GhostScript.

TkAgg is probably the best backend for interactive use from the
standard Python shell or IPython. It is enabled as the default backend
standard Python shell or IPython. It is enabled as the default backend
for the official binaries. GTK3 is not supported on Windows.

The Windows installers (:file:`*.exe`) and wheels (:file:`*.whl`) on
the `PyPI download page <http://pypi.python.org/pypi/matplotlib/>`_ do
not contain test data or example code. If you want to try the many
demos that come in the matplotlib source distribution, download the
:file:`*.tar.gz` file and look in the :file:`examples` subdirectory.
To run the test suite, copy the :file:`lib\matplotlib\tests` and
:file:`lib\mpl_toolkits\tests` directories from the source
distribution to :file:`sys.prefix\Lib\site-packages\matplotlib` and
:file:`sys.prefix\Lib\site-packages\mpl_toolkits` respectively, and
The Windows wheels (:file:`*.whl`) on the `PyPI download page
<https://pypi.python.org/pypi/matplotlib/>`_ do not contain test data
or example code.
If you want to try the many demos that come in the matplotlib source
distribution, download the :file:`*.tar.gz` file and look in the
:file:`examples` subdirectory.
To run the test suite, copy the :file:`lib\\matplotlib\\tests` and
:file:`lib\\mpl_toolkits\\tests` directories from the source
distribution to :file:`sys.prefix\\Lib\\site-packages\\matplotlib` and
:file:`sys.prefix\\Lib\\site-packages\\mpl_toolkits` respectively, and
install `nose <https://pypi.python.org/pypi/nose>`_, `mock
<https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape
<http://inkscape.org/>`_.
<https://inkscape.org/>`_.



Expand Down Expand Up @@ -320,17 +313,14 @@ git repository and follow the instruction in :file:`README.osx`.

.. _build_windows:


Building on Windows
-------------------

The Python shipped from http://www.python.org is compiled with Visual Studio
2008 for versions before 3.3 and Visual Studio 2010 for 3.3 and later. Python
extensions are recommended to be compiled with the same compiler. The .NET
Framework 4.0 is required for MSBuild (you'll likely have the requisite
Framework with Visual Studio). In addition to Visual Studio `CMake
<http://www.cmake.org>`_ is required for building libpng.

Since there is no canonical Windows package manager the build methods for
freetype, zlib, libpng, tcl, & tk source code are documented as a build script
2008 for versions before 3.3, Visual Studio 2010 for 3.3 and 3.4, and
Visual Studio 2015 for 3.5. Python extensions are recommended to be compiled
with the same compiler.

Since there is no canonical Windows package manager, the methods for building
freetype, zlib, and libpng from source code are documented as a build script
at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_.
10 changes: 4 additions & 6 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1>Introduction</h1>
You can generate plots, histograms, power spectra, bar charts,
errorcharts, scatterplots, etc, with just a few lines of code.
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
<a href="examples/index.html">examples</a> directory</p>
<a href="{{ pathto('examples/index') }}">examples</a> directory</p>

<p>For simple plotting the <tt>pyplot</tt> interface provides a
MATLAB-like interface, particularly when combined
Expand Down Expand Up @@ -98,9 +98,7 @@ <h1>John Hunter (1968-2012)</h1>

<h1>Installation</h1>

Visit the
<a href="http://matplotlib.org/users/installing.html">matplotlib
installation instructions.</a>.
Visit the <a href="{{ pathto('users/installing') }}">matplotlib installation instructions</a>.

<h1>Documentation</h1>

Expand All @@ -112,8 +110,8 @@ <h1>Documentation</h1>
</script>

<p>Trying to learn how to do a particular kind of plot? Check out
the <a href="gallery.html">gallery</a>, <a href="examples/index.html">examples</a>,
or the <a href="api/pyplot_summary.html">list of plotting
the <a href="{{ pathto('gallery') }}">gallery</a>, <a href="{{ pathto('examples/index') }}">examples</a>,
or the <a href="{{ pathto('api/pyplot_summary') }}">list of plotting
commands</a>.</p>

<h4>Other learning resources</h4>
Expand Down
47 changes: 1 addition & 46 deletions doc/faq/installing_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,6 @@ matplotlib was originally installed on your system. Follow the steps
below that goes with your original installation method to cleanly
remove matplotlib from your system.

Easy Install
------------

1. Delete the caches from your :ref:`.matplotlib configuration directory
<locating-matplotlib-config-dir>`.

2. Run::

easy_install -m matplotlib


3. Delete any .egg files or directories from your :ref:`installation
directory <locating-matplotlib-install>`.



Windows installer
-----------------

1. Delete the caches from your :ref:`.matplotlib configuration directory
<locating-matplotlib-config-dir>`.

2. Use :menuselection:`Start --> Control Panel` to start the :program:`Add and
Remove Software` utility.

Source install
--------------

Expand Down Expand Up @@ -374,24 +349,4 @@ know: see :ref:`reporting-problems`.
Windows Notes
=============

We recommend you use one of the excellent python collections which include
Python itself and a wide range of libraries including matplotlib:

- Anaconda_ from `Continuum Analytics`_
- Canopy_ from Enthought_
- `Python (x, y) <https://code.google.com/p/pythonxy>`_

Python (X, Y) is Windows-only, whereas Anaconda and Canopy are cross-platform.

.. _windows-installers:

Standalone binary installers for Windows
----------------------------------------

If you have already installed Python and numpy, you can use one of the
matplotlib binary installers for windows -- you can get these from the
`the PyPI matplotlib page <http://pypi.python.org/pypi/matplotlib>`_
site. Choose the files with an ``.exe`` extension that match your
version of Python (e.g., ``py2.7`` if you installed Python 2.7). If
you haven't already installed Python, you can get the official version
from the `Python web site <http://python.org/download/>`_.
See :ref:`installing_windows`.