I've wanted to try matplotlib for the first time but when I import it, there is an error. The only line of my code is:
from matplotlib import pyplot as plt
but when I run this, I have this error:
Traceback (most recent call last):
File "/Users/mylaptop/Desktop/main.py", line 1, in <module>
from matplotlib import pyplot as plt
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/matplotlib/__init__.py", line 903, in <module>
rcParamsDefault = _rc_params_in_file(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/matplotlib/__init__.py", line 834, in _rc_params_in_file
config[key] = val # try to convert to proper type or raise
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/matplotlib/__init__.py", line 678, in __setitem__
raise ValueError(f"Key {key}: {ve}") from None
ValueError: Key axes.prop_cycle: 'cycler('color', ['1f77b4', 'ff7f0e', '2ca02c', 'd62728', '9467bd', '8c564b', 'e377c2', '7f7f7f', 'bcbd22', '17becf'])' is not a valid cycler construction: name 'np' is not defined
I have no idea on how to fix it. I am on Mac and I use the Pycharm IDE.