If you select a Python SDK with the configured Conda environment, the Use Conda Package Manager toggle appears in the packages area toolbar. Use this toggle to manage packages from the Conda environment repository. The following backends work out of the box: Agg, ps, pdf, svg and TkAgg. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you may need to install additional dependencies. The Conda package manager and Anaconda packages have helped Python on Windows be less painful. Conda support is needed to keep the. Visual Studio for Mac 424. $ conda install numpy. $ conda create -n py3k anaconda python = 3. There are two variants of the installer: Miniconda is Python 2 based and Miniconda3 is Python 3 based. Note that the choice of which Miniconda is installed only affects the root environment. I'm using vscode in Windows 10 as my code editor, and want to make an easy way to launch it with the correct conda env to allow debugging. Currently I am having to open a command prompt, then activate the conda env, then paste the shortcut to vscode into the prompt to execute. Conda is a cross-platform, language-agnostic binary package manager. It is the package manager used by Anaconda installations, but it may be used for other systems as well. Conda makes environments first-class citizens, making it easy to create independent environments even for C libraries.
Installing an official release
Matplotlib and most of its dependencies are all available as wheel packages for macOS, Windows and Linux distributions:
Windows
In case Python 2.7 or 3.4 are not installed for all users, the Microsoft Visual C++ 2008 (64 bit or 32 bit for Python 2.7) or Microsoft Visual C++ 2010 (64 bit or 32 bit for Python 3.4) redistributable packages need to be installed.
macOS
If you are using Python 2.7 on a Mac you may need to do:
so that subprocess32, a dependency, may be compiled. To use the native OSX backend you will need a framework build build of Python.
Linux
On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32
Test Data
The wheels (*.whl) on the PyPI download page 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 *.tar.gz file and look in the examples subdirectory. To run the test suite:
- extract the libmatplotlibtestsor libmpl_toolkitstests directories from the source distribution;
- install test dependencies: pytest, mock, Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, and Inkscape;
- run testpathtotestsdirectory.
Scientific Python Distributions
Both Anaconda and Canopy are both excellent choices that “just work” out of the box for Windows, macOS and common Linux platforms. WinPython is an option for windows users. All of these distributions include Matplotlib and lots of other useful tools.
Linux : using your package manager
If you are on Linux, you might prefer to use your package manager. Matplotlib is packaged for almost every major Linux distribution.
- Debian / Ubuntu: sudo apt-get install python3-matplotlib
- Fedora: sudo dnf install python3-matplotlib
- Red Hat: sudo yum install python3-matplotlib
- Arch: sudo pacman -S python-matplotlib
Installing from source
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. Grab the latest tar.gz release file from the PyPI files page, or if you want to develop Matplotlib or just need the latest bugfixed version, grab the latest git version Install from source.
The standard environment variables CC, CXX, PKG_CONFIG are respected. This means you can set them if your toolchain is prefixed. This may be used for cross compiling.