Python, Error while installing matplotlib
Solution 1:
-
python -m pip install --upgrade pip
-
pip install matplotlib==3.3.1
Worked for me.
Solution 2:
edit: matplotlib has now released wheels for python 3.9 so pip install --upgrade matplotlib
should work.
original answer
matplotlib hasn't made a wheel yet for version 3.9 so your python attempted to build it from source. You should downgrade to python 3.8 and then everything should work
Solution 3:
This is because matplotlib has no 3.9 wheels ..
For convenience in the use of matplotlib, you can install anaconda. In anaconda environment matplotlib, numpy and pandas are available by default for Python installed in Anaconda. Or you can use lower versions of Python.