I installed matplotlib using conda
:
conda install matplotlib
The following code failed:
#!/usr/bin/env python
import matplotlib
import matplotlib.pyplot as plt
With this error message:
"ImportError: No module named 'matplotlib.pyplot'"
I tried installing matplotlib with apt-get
:
sudo apt-get install python3-matplotlib
I got the same error.
I tried loading matplotlib with ubuntu application load and got the same error.
I tried cloning from GitHub with:
git clone git://github.com/matplotlib/matplotlib.git
I got the same error.
I looked at the matplotlib directory and did not see a pyplot.py entry. I did find pyplot.py in matplotlib/lib/matplotlib. I copied it to matplotlib. The error went away, but I got another module that pyplot was trying to include. I found it in matplotlib/lib/matplotlib. I copied it to matplotlib. Got another error for another module. Copied it. Eventually I got an error for a module I could not find.
I do not know what to try next.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…