Help regarding - cannot import name 'pyplot' error
I often get "cannot import name 'pyplot' error"
when i try to import matplotlib
As a work around, I go to Examples folder and run any plotting example, then it works,
after which i can import matplotlib normally.
The error states something about "frozen importlib._bootstrap"
How can i avoid this error, in pythonista 3
# Histogram # Basic plot import numpy as np import matplotlib.pyplot as plt height = [3, 12, 5, 18, 45] bars = ('A', 'B', 'C', 'D', 'E') y_pos = np.arange(len(bars)) plt.bar(y_pos, height, color=(0.2, 0.4, 0.6, 0.6)) # Custom Axis title plt.xlabel('X Axis Title', fontweight='bold', color = 'red', fontsize='17', horizontalalignment='center') plt.show()```
Thank you very much @ccc for your constant support and prompt help.
Yes, I found some old file, i had named matplotlib.py ,
I have renamed it and now everything works fine.
Silly mistake on my part when i started with pythonista.