My Issue. I am trying to run matplotlib on python 3.10 on my MacOS, but I get the following error:
ModuleNotFoundError: No module named 'matplotlib'
However, when I try running
pip install matplotlib
then I get back
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.9/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: numpy>=1.16 in ./mambaforge/lib/python3.9/site-packages (from matplotlib) (1.21.2)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.9/site-packages (from matplotlib) (1.3.2)
Requirement already satisfied: pyparsing>=2.2.1 in ./.local/lib/python3.9/site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in ./.local/lib/python3.9/site-packages (from matplotlib) (8.3.2)
Requirement already satisfied: python-dateutil>=2.7 in ./.local/lib/python3.9/site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six in ./mambaforge/lib/python3.9/site-packages (from cycler>=0.10->matplotlib) (1.16.0)
Also, in response to
python3 --version
terminal says
Python 3.9.6
Also, I am able to use matplotlib just fine if I compile my code using Python 2.7.16 on Sublime Text 3.
My Question. How can I get matplotlib to run on Python 3.10?
Since I am still new to Python (or to programming, for that matter), please let me know if I should provide additional information.
Note: I have already looked at this and this, but I couldn't fix the issue.