Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio code (run Python file in terminal does not work) [closed]

visual studio code,screenshot pressing run does not work on mac. Let say I want to print the word "Hello" and run the code print("Hello"), it will not be executed. I tried reinstalling python and visual studio but I could't resolve the problem.

like image 421
long Avatar asked Jun 04 '26 19:06

long


1 Answers

I ran into the same issue. Figured out that I forgot to select the Add Python 3.8 to PATH while installing. You can either choose to uninstall and reinstall Python and make sure to select the above option OR you can manually update the user environment variable for PATH and add the path to scripts and python like the following.

C:\Users\<addyourusernamehere>\AppData\Local\Programs\Python\Python38-32\Scripts\
C:\Users\<addyourusernamehere>\AppData\Local\Programs\Python\Python38-32\
like image 188
Praveen Yerneni Avatar answered Jun 07 '26 08:06

Praveen Yerneni