简体   繁体   中英

Visual studio code cant find python import

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

"""

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM