skip to Main Content

I cannot seem to figure out this issue. I have all modules properly installed, but they are not being recognized in VSCode. I have setup an environment.
Error Messages
Showing that packages were installed

I am new to python and would appreciate it.
Thank you.

I tried reinstalling all python modules. I also tried setting up my environment. I am pretty sure everything is properly installed, am asking how to fix this.

2

Answers


  1. I am unsure as to why this is happening, but I hope that one of these solutions can help you.

    A. Verify the Python interpreter.

    • At the bottom-left corner make sure that you have selected the correct
      interpreter.

    B. Verify the Python path.

    • In some instances, VS code may not automatically recognize the correct
      Python path and so to ensure that the path is correct, open the VS code
      settings and then select file > preferences > settings > Search for
      "Python Path" and check that the path points to the correct Python.

    C. Check for typos and case sensitivity.

    • Make sure that you are importing the modules correctly in your Python
      code. Python is case-sensitive, so check for typos and ensure that the
      module names match the installed packages exactly.

    D. Lastly, try restarting VS code after you make any changes to the settings.

    Login or Signup to reply.
  2. It can be happened If the Python version set in vscode and the Python version where the modules are installed are different.
    Please check the Python version set in vscode.
    It is placed the bottom line in vscode like below.
    enter image description here

    Then, check the Python version of installed packages
    If you had been installing Python modules by pip3 command,
    Python3 path and pip3 path will be similar like below
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search