Search code examples
pythonvisual-studio-codepipmodulenotfounderror

Python Module not Found after pip install in VSCode


Installed a new fresh version of python and running into the following error in VS Code:

Here are the steps I have taken:

  1. Create Virtual Environment and activate:

enter image description here

  1. Create Test.py Script and Test out importing module. Not found... Though strangely it is predicted as I type?

enter image description here

enter image description here

I notice its underlined in yellow so need to install the module.

3.Install module using pip: enter image description here

4.All seems successfully installed and yellow line goes away enter image description here

  1. Running Script I Still get the error:

enter image description here

No idea why.

I have removed the virtual environment and reinstalled. same with the modules but no change.

only thing I think is odd is that after removal it still predicts Matplotlib as in the first image... SO maybe it's getting confused in some way?


Solution

  • 'python3 -m pip install matplotlib'