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

OSX install #3238

Merged
merged 13 commits into from Jul 17, 2014
29 changes: 14 additions & 15 deletions INSTALL
Expand Up @@ -11,18 +11,18 @@ depends on what operating system you are using, what you already have
installed, and how you want to use it. To avoid wading through all
the details (and potential complications) on this page, the easiest
thing for you to do is use one of the pre-packaged python
distributions that already provide matplotlib built-in. The Enthought
Python Distribution `(EPD)
<http://www.enthought.com/products/epd.php>`_ for Windows, OS X or
Redhat is an excellent choice that "just works" out of the box.
distributions that already provide matplotlib built-in. The Continuum.io
Python distribution `(Anaconda)
<https://store.continuum.io/cshop/anaconda/>`_ and the Enthought
distribution `(Canopy) <https://www.enthought.com/products/canopy/>`_
are both excellent choices that "just work" out of the box for any
platform. Both of these packages include matplotlib and
*lots* of other useful tools.
Another excellent alternative for Windows users is `Python (x, y)
<http://www.pythonxy.com/>`_ which tends to be updated a bit more
frequently. Both of these packages include matplotlib and pylab, and
*lots* of other useful tools. matplotlib is also packaged for almost
<https://code.google.com/p/pythonxy>`_ . matplotlib is also packaged for almost
every major Linux distribution. So if you are on Linux, your package
manager will probably provide matplotlib prebuilt.


Manually installing pre-built packages
======================================

Expand Down Expand Up @@ -198,6 +198,12 @@ six 1.3 or later
Python 2/3 compatibility library. This is also a dependency of
:term:`dateutil`.

libpng 1.2 (or later)
library for loading and saving :term:`PNG` files (`download
<http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
zlib. If you are a Windows user, you can ignore this because we
build support into the matplotlib single-click installer


**Optional GUI frameworks**

Expand Down Expand Up @@ -241,13 +247,6 @@ ImageMagick
user, you can ignore this since we build support into the
matplotlib single click installer.


libpng 1.2 (or later)
library for loading and saving :term:`PNG` files (`download
<http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
zlib. If you are a Windows user, you can ignore this because we
build support into the matplotlib single-click installer

**Required libraries that ship with matplotlib**

:term:`agg` 2.4
Expand Down
21 changes: 14 additions & 7 deletions README.osx
@@ -1,11 +1,12 @@
Building mpl on OSX has proven to be a nightmare because of all the
Building mpl on OSX is sometimes a nightmare because of all the
different types of zlib, png and freetype that may be on your system.
The recommended and supported way to build is to use a third-party
package manager to install the required dependencies, and then
install matplotlib from source using the setup.py script. Two widely
used package managers are homebrew and MacPorts. The following
example illustrates how to install libpng and freetype using
homebrew.

For developers who want to build matplotlib from source, the recommended and
supported way to build is to use a third-party package manager to install the
required dependencies, and then install matplotlib from source using the
setup.py script. Two widely used package managers are homebrew, and
MacPorts. The following example illustrates how to install libpng and freetype
using brew:

Example usage::

Expand All @@ -22,3 +23,9 @@ To install matplotlib from source, execute:
Example usage::

python setup.py install
Copy link
Member

Choose a reason for hiding this comment

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

So -- this is totally cool, but I think we maybe just discovered this doesn't work (at least it didn't for Michael Nagy and I). building matplotlib from source using conda as dependencies, it doesn't pick up freetype from conda since conda doesn't include pkg-config. Anyway, if it's working for you @katyhuff, it would be good to know so we can get to the bottom of the cause.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhhh... I have two sets of each library installed. Glad you caught this. Matplotlib is picking up my macports libpng rather than the conda one! Changing instructions back accordingly.



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.