I installed python3 on Windows using the Anaconda installer. I then installed matplotlib using pip.
However, I can't get matplotlib to work in Sublime Text. When I try import matplotlib.pyplot as plt I get ModuleNotFoundError: No module named 'matplotlib.pyplot'; 'matplotlib' is not a package.
If I run python in the console it works fine.
It turns out I have two versions of python installed.
pip 20.1.1 from c:\programdata\anaconda3\lib\site-packages\pip (python 3.7)
python --version
Python 3.7.6
I saw that I can install for a specific version of python here: Python Pip Installing for Wrong Version
However none of py -3.7.6 -m pip install matplotlib, python-3.7.6 -m pip install matplotlib, python3.7.6 -m pip install matplotlib work and if I explicitly run pip with python 3.7.6 via C:\ProgramData\Anaconda3\python.exe -m pip install matplotlib it says already installed and I still get the same error.
How do I get matplotlib installed for python 3.7.6 so I can use it in Sublime Text?