Python & Matplotlib on OSX
February 26, 2016
One day, we will hopefully have a grand unified build and package management system for Python where everything is free & open and Just Works (TM). Until then, you have two options:
brew Python + pip
brew install python3
pyvenv -v ~/envs/py3
source ~/envs/py3/bin/activate
pip install matplotlib
Pros/cons:
- Pip is the standard Python package management tool, and uses the official Python Package Index (PyPi) repository.
- Wheels on PyPi are built by authors themselves from open recipes.
- Binary wheels may not be available for all packages.
- Pip is not the best of package management tools.
Conda
- Download and install miniconda
conda create -n py3 python=3.5 matplotlib
source activate py3
Pros/cons:
- Conda is a great package management tool.
- Conda environments are well tested; almost everything works out of the box. This includes fast linear algebra using MKL.
- Some of the conda build recipes are closed and binary wheels may not be available for all packages1.
- Conda and pip do not always play well together.
- Conda packages are supported almost exclusively by a single company.
-
Some members of the community maintain their own channels, but there are still some issues to be aware of when mixing those channels and the official ones. ↩︎