I have two python compilers on my Ubuntu 14.04 VM. I have installed matplotlib as
pip install matplotlib
But the matplotlib cannot be used from python3.It can be used from python2.7
If I use import matplotlib.pyplot as plt inside my script test.py and run it as
python3 test.py
I get the error
ImportError: No module named 'matplotlib'
How can this be fixed.