Sunday, March 18, 2018

Matplotlib.pyplot not working on Mac in virtualenv

I had a very curious problem where python would not find pyplot in matplotlib.

I was using:

  • python3
  • virtualenv
  • matplotlib

To create the virtual environment I used: 
virtualenv -p python3 <myproject name>

However, when I used:
python3 -m venv <myproject name>

It worked ok.

An explanation was found here: