Solution: I had a sneaky system environment variable that put the 3.10 python variable into the path. Deleted that variable.
I'm super new and trying to import modules like matplotlib to Python. When I hit "run python file", the terminal produces exactly what I want, confirming the import worked. But when I hit "run code" I get the following in the output:
Traceback (most recent call last):
File "c:\Users\user\AppData\Local\Programs\Python\Python39\Workpls\test.py", line 1, in module
import matplotlib
ModuleNotFoundError: No module named 'matplotlib'"
This is the code I ran in both terminal and output:
import matplotlib
help(matplotlib)
For more context: It appears I have two python folders of differing versions (v3.9 & v3.10) in my APPDATA/Local/Programs folder. In VSCode I changed everything to the one of interest(v3.9): the vscode default python interpreter path, the interpreter in the blue ribbon at the bottom of vscode, and the command palette Python: Select Interpreter (note that for some reason it still shows v3.10 as the global version in the palette drop down). Yet it still doesn't produce the desired output.