Skip to content

Instantly share code, notes, and snippets.

@rameezk
Last active October 14, 2020 13:14
Show Gist options
  • Save rameezk/fa9f12c6353d95f53e1a790ac4bef675 to your computer and use it in GitHub Desktop.
Save rameezk/fa9f12c6353d95f53e1a790ac4bef675 to your computer and use it in GitHub Desktop.
Installing Matplotlib Using Python 3.9 on MacOS
  1. Install numpy (1.18.2)
pip install numpy==1.18.2
  1. Get build tools
xcode-select --install

May have to accept license with:

sudo xcodebuild -license
  1. Install Pillow (used by Matplotlib) build deps
brew install zlib freetype harfbuzz fribidi libtiff libjpeg webp little-cms2
  1. Symlink zlib headers
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h /usr/local/include/zlib.h
  1. Install Matplotlib
pip install matplotlib==3.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment