I am brand new to Python and am following the tutorial at this link: https://code.visualstudio.com/docs/python/python-tutorial
I was able to execute
python -m pip install matplotlib
However, then when trying to run script:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 20, 100)
plt.plot(x, np.sin(x))
plt.show()
I get:
PS C:\Code\Astros\Prism> & C:/Users/USER/AppData/Local/Programs/Python/Python38/python.exe c:/Code/Astros/Prism/Prism.py
Traceback (most recent call last):
File "c:/Code/Astros/Prism/Prism.py", line 1, in <module>
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
PS C:\Code\Astros\Prism>
Any guidance would be much appreciated.