Home > database >  VScode Extension Code Runner not working/error (python) when I run program
VScode Extension Code Runner not working/error (python) when I run program

Time:05-09

When I installed the code runner extension and I can't run the python program this error popped up:

[![Image][1]][1]

Copyright © Microsoft Corporation. All rights reserved. 
Try the new cross-platform PowerShell https://aka.ms/pscore6 
Warning: PowerShell detected that you might be using a screen-reader and has disabled PSReadLine for compatibility purposes. 
If you want to re-enable it, run 'Import - Module PSReadLine'. 
PS C:\Users\Admin\OneDrive\Máy tính\py projects python -u " C\Users\ Admin\OneDrive\Máy tính\py project\test.py " python : The term 'python' is not recognized as the name of a cmdlet , function ,script file ,or operable program. Check the spelling of the name ,or if a path was included ,verify that the path is correct and try again. 
At line :1 char :1 
  python -u " C:\Users\Admin\OneDrive\Máy tính\py project\test.py "  ' ~~~~~~
  CategoryInfo : ObjectNotFound: (python:String) [], CommandNotException
  FullyQualifiedErrorId : CommandNotFoundException

When I turned off the extension the code run normally, but when I turned on the error pop up. Thank you for reading my problem! ( •̀ ω •́ )✧ [1]: enter image description here

updates:

enter image description here

You can use this option to run your python file. This is the file running option officially provided by Microsoft.

CodePudding user response:

Make sure you have python installed. IN the bottom left of VScode you have to pick an interpreter and make sure you select python. If you need to select your language, select python, and also name your file "FileName.py".

  • Related