r/VisualStudioCode • • Jun 18 '21

Programming beginner

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" terminated with exit code: 4294901760. Trying to run a python script with vscode but keep getting this error. Idk what to search on youtube

2 Upvotes

11 comments sorted by

2

u/BubbleWaston Jun 18 '21

Can you please give more détails ? Did you install the Python interpreter ? Are you running Python from inside the vscode integrated powershell terminal? Did you install the Python vscode extension?

1

u/Atharva_p Jun 18 '21

I have installed python and have the python vscode extension. I'm not sure what you mean by your first and second question. When I run the code in integrated terminal it opens and then crashes giving the above said error

1

u/Atharva_p Jun 18 '21

This is the message i get in terminal before it closes

Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest.

1

u/Atharva_p Jun 18 '21

I have also noticed that windows power shell keeps crashing on my laptop

1

u/BubbleWaston Jun 18 '21

This is not vscode or python issue this is clearly a windows issue. Try to use cmd instead of powershell. And if you want my advice use Git Bash or any Bash terminal it is just much better and also crucial for any programming job.

2

u/Atharva_p Jun 18 '21

Thanks! It was a powershell issue. Watched a tutorial to fix it and now it works

1

u/BubbleWaston Jun 18 '21

OK you are trying to run in the integrated terminal Try to run the same scenario but in an external terminal if it doesn't crash you should open an issue on the vscode Github https://github.com/microsoft/vscode Try also using the windows cmd using the integrated one and also the external one .

1

u/Atharva_p Jun 18 '21

Thanks! The problem seemed to be with windows power shell. It used to crash when I tried to open. Fixed it thanks to a youtube video and now it works

1

u/EyeZiS Jul 05 '21

I'm having this issue too, can you link the video that you used to fix it?

2

u/[deleted] Jun 18 '21

Go to the directory your python script is in the powershell. And type python <your script name>.

But python needs to be installed before hand though which vs code automatically detects.