Download Matplotlib Mac
There are many different ways to install matplotlib, and the best waydepends on what operating system you are using, what you already haveinstalled, and how you want to use it. To avoid wading through allthe details (and potential complications) on this page, there are severalconvenient options.
Installing pre-built packages¶
Bug report Bug summary Matplotlib installation through pip fails on Python 3.8.0b3 due to a problem with Visual C. I was able to successfully install matplotlib on Python 3.7.4 without the bug.
Most platforms : scientific Python distributions¶
Installing Matplotlib on your Mac or Windows Laptop First install Python 3.x: Even if you have an older version of Python, e.g., Python 3.2, on your laptop, you can still install a newer version, e.g., 3.5 or 3.6. The latest version of matplotlib is 2.2 on Mac Informer. It is a perfect match for IDE in the Developer Tools category. The app is developed by John Hunter and its user rating is 3.2 out of 5. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Check out our home page for more information. Matplotlib produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms. Download matplotlib for Mac 2.1.0 for Mac. Fast downloads of the latest free software!
The first option is to use one of the pre-packaged pythondistributions that already provide matplotlib built-in. TheContinuum.io Python distribution (Anaconda or miniconda) and the Enthoughtdistribution (Canopy)are both excellent choices that “just work” out of the box forWindows, OSX and common Linux platforms. Both of these distributionsinclude matplotlib and lots of other useful tools. Anotherexcellent alternative for Windows users is Python (x, y) .
Linux : using your package manager¶
If you are on Linux, you might prefer to use your package manager. matplotlibis packaged for almost every major Linux distribution.
- Debian / Ubuntu : sudoapt-getinstallpython-matplotlib
- Fedora / Redhat : sudoyuminstallpython-matplotlib
Mac OSX : using pip¶
If you are on Mac OSX you can probably install matplotlib binaries using thestandard Python installation program pip.See Installing OSX binary wheels.
If you don’t already have Python installed, we recommend usingone of the scipy-stack compatible Python distributions such as Python(x,y),Enthought Canopy, or Continuum Anaconda, which have matplotlib andmany of its dependencies, plus other useful packages, preinstalled.
For standard Python installationsyou will also need to install compatible versions ofsetuptools,numpy,python-dateutil,pytz,pyparsing andsixin addition tomatplotlib.
In case Python is not installed for all users (not the default), theMicrosoft Visual C++ 2008 (64 bitor32 bitfor Python 2.6 to 3.2) or Microsoft Visual C++ 2010 (64 bitor32 bitfor Python 3.3 and 3.4) redistributable packages need to be installed.
Matplotlib depends on Pillowfor reading and saving JPEG, BMP, and TIFF image files.Matplotlib requires MiKTeX andGhostScript for rendering textwith LaTeX.FFmpeg, avconv,mencoder, orImageMagick are required for theanimation module.
The following backends should work out of the box: agg, tkagg, ps,pdf and svg.For other backends you may need to installpycairo,PyQt4,PyQt5,PySide,wxPython,PyGTK,Tornado,or GhostScript.
TkAgg is probably the best backend for interactive use from thestandard Python shell or IPython. It is enabled as the default backendfor the official binaries. GTK3 is not supported on Windows.
The Windows installers (*.exe) and wheels (*.whl) onthe download page do notcontain test data or example code.If you want to try the many demos that come in the matplotlib sourcedistribution, download the *.tar.gz file and look in theexamples subdirectory.To run the test suite, copy the libmatplotlibtests andlibmpl_toolkitstests directories from the source distribution tosys.prefixLibsite-packagesmatplotlib andsys.prefixLibsite-packagesmpl_toolkits respectively, and installnose,mock,Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, andInkscape.
Installing from source¶
If you are interested in contributing to matplotlib development,running the latest source code, or just like to build everythingyourself, it is not difficult to build matplotlib from source. Grabthe latest tar.gz release file from the download page, or if you wantto develop matplotlib or just need the latest bugfixed version, grabthe latest git version Source install from git.
Once you have satisfied the requirements detailed below (mainlypython, numpy, libpng and freetype), you can build matplotlib:
We provide a setup.cfgfile that goes with setup.py which you can use to customizethe build process. For example, which default backend to use, whethersome of the optional libraries that matplotlib ships with areinstalled, and so on. This file will be particularly useful to thosepackaging matplotlib.
If you have installed prerequisites to nonstandard places and need toinform matplotlib where they are, edit setupext.py and add the basedirs to the basedir dictionary entry for your sys.platform.e.g., if the header to some required library is in/some/path/include/someheader.h, put /some/path in thebasedir list for your platform.
These are external packages which you will need to install beforeinstalling matplotlib. If you are building on OSX, seeBuilding on OSX. If you are building on Windows, seeBuilding on Windows. If you are installing dependencies with apackage manager on Linux, you may need to install the developmentpackages (look for a “-dev” postfix) in addition to the librariesthemselves.
- python 2.6, 2.7, 3.3 or 3.4
- Download python.
- numpy 1.6 (or later)
- array support for python (download numpy)
- dateutil 1.1 or later
- Provides extensions to python datetime handling. If using pip,easy_install or installing from source, the installer will attemptto download and install python_dateutil from PyPI. Note thatpython_dateutil also depends on six. pip and other packagemanagers should handle installing that secondary dependencyautomatically.
- Required for matplotlib’s mathtext math rendering support. Ifusing pip, easy_install or installing from source, the installerwill attempt to download and install pyparsing from PyPI.
- six 1.4 or later
- Python 2/3 compatibility library. This is also a dependency ofdateutil.
- libpng 1.2 (or later)
- library for loading and saving PNG files (download). libpng requireszlib.
- Used to manipulate time-zone aware datetimes.
Optional GUI framework¶
These are optional packages which you may want to install to usematplotlib with a user interface toolkit. SeeWhat is a backend? for more details on the optional matplotlibbackends and the capabilities they provide.
- tk 8.3 or later
- The TCL/Tk widgets library used by the TkAgg backend
- pyqt 4.0 or later
- The Qt4 widgets library python wrappers for the Qt4Agg backend
- pygtk 2.4 or later
- The python wrappers for the GTK widgets library for use with theGTK or GTKAgg backend
- wxpython 2.8 or later
- The python wrappers for the wx widgets library for use with theWX or WXAgg backend
Optional external programs¶
- ffmpeg/avconv or mencoder
- Required for the animation module to be save out put to movieformats.
- Required for the animation module to be able to save to animated gif.
- If Pillow is installed, matplotlib can read and write a largerselection of image file formats.
- freetype 2.3 or later
- library for reading true type font files.
Required libraries that ship with matplotlib¶
- agg 2.4
- The antigrain C++ rendering engine. matplotlib links against theagg template source statically, so it will not affect anything onyour system outside of matplotlib.
- PyCXX 6.2.4
- A library for writing Python extensions in C++.
- qhull 2012.1
- A library for computing convex hulls. Used for computing triangulationand meshes.
- truetype font utility
Building on Linux¶
It is easiest to use your system package manager to install the dependencies.
If you are on Debian/Ubuntu, you can get all the dependenciesrequired to build matplotlib with:
If you are on Fedora/RedHat, you can get all the dependencies requiredto build matplotlib by first installing yum-builddep and thenrunning:
This does not build matplotlib, but it does get the install thebuild dependencies, which will make building from source easier.
Building on OSX¶
Download Matplotlib Mac Python
The build situation on OSX is complicated by the various places onecan get the libpng and freetype requirements (darwinports, fink,/usr/X11R6) and the different architectures (e.g., x86, ppc, universal) andthe different OSX version (e.g., 10.4 and 10.5). We recommend that you buildthe way we do for the OSX release: get the source from the tarball or thegit repository and follow the instruction in README.osx.
Building on Windows¶
The Python shipped from http://www.python.org is compiled with Visual Studio2008 for versions before 3.3 and Visual Studio 2010 for 3.3 and later. Pythonextensions are recommended to be compiled with the same compiler. The .NETFramework 4.0 is required for MSBuild (you’ll likely have the requisiteFramework with Visual Studio). In addition to Visual Studio CMake is required for building libpng.
Download Matplotlib For Python 2.7 Mac
Since there is no canonical Windows package manager the build methods forfreetype, zlib, libpng, tcl, & tk source code are documented as a build scriptat matplotlib-winbuild.