This is a short tutorial on how to install Matplotlib in macOS (10.4/Mojave).
We will use the
pip package installer for Python.
$ curl -O https://bootstrap.pypa.io/get-pip.py
Next run the below command to install
$ python3 get-pip.py
If the installation is successful, you will see the following message in the console (version may vary).
Successfully installed pip-19.1.1
Lastly, install Matplotlib and all its dependencies
$ python3 -mpip install matplotlib
You can check the Matplolib version just installed straight from the termianal. Start the interactive shell for the Python interpreter.
You will find the interpreter in interactive mode, when the prompt consists of three greater-than signs (>>>), known as the Python REPL prompt. Run the below two commands.
>>> import matplotlib >>> matplotlib.__version__