Home > Software engineering >  Visual studio code cant find python import
Visual studio code cant find python import

Time:04-16

Visual studio code cant find imports that are obviuously installed. No tensorflow no pygame no nothing. I used """pip install """ for everything, And it wont find it. Pycharm does find it but only by downloading it using pycharm. I have no idea what to do.

And this is the error message: """ Exception has occurred: ModuleNotFoundError No module named 'tensorflow' File "D:\a game 2\python\github\computer\main.py", line 3, in import tensorflow """

And for some reason i get this error for every file, not just with custom imports: """ pyenv : File C:\Users\rocko.pyenv\pyenv-win\bin\pyenv.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • pyenv shell 3.10.0b3
  •     CategoryInfo          : SecurityError: (:) [], PSSecurityException
        FullyQualifiedErrorId : UnauthorizedAccess
    

"""

CodePudding user response:

Have you tried changing the Python version used? Press [ctrl] [shift] [p] and search for select Python: select interpreter.

  • Related