Home > front end >  Unable to Import & Import could not be resolved
Unable to Import & Import could not be resolved

Time:09-29

i started programming today and i'm testing different code segments on Visual Studio Code. However, when i tried importing a "numpy", 2 errors occured. I then proceeded to check other stack-overflow posts regarding this and I tried switching the Python Interpreter, however nothing changed. I also attempted doing other suggestions, however I don't understand how to do some of the suggestions (its my first time programming etc.)

enter image description here

Below is a zoomed up picture of it enter image description here

I was wondering if I could get some help?

CodePudding user response:

Try opening the project folder in VsCode instead of opening the file by itself. If that doesn't work, run the file through CMD, if running it through CMD doesn't work, you might not have the numpy library. You can do that by going to CMD and write the following command:

pip install numpy

CodePudding user response:

Run

pip show numpy

in integrated terminal, check if its location is <your selected interpreter>\lib\site-packages.

If is, reload window then the error should go away.

If not, please open an integrated Terminal and reinstall the module to current selected python environment.

  • Related