Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I'm trying to run a simple print script in Visual Studio Code with Python, but nothing shows up in terminal or output

I’ve tried doing so much stuff, but nothing works.

My code and directory:

my code and directory

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Terminal after I try running it:

terminal after i try running it

another attempt

I tried disabling some extensions. Nothing
I tried running the command in my terminal. Nothing.
I tried looking at other posts about it. Nothing.

>Solution :

You are not running your terminal in the same path where the file is located. The easiest way to go is to open the folder that contains your file using vscode. Right click on the folder and chose "Open with Code". Then your terminal will run there by default.

Otherwise change the directory to the correct location using something likecd "OneDrive/documents/python stuff".

Or specify the path of the file you are trying to run. Something like this:> python "/OneDrive/documents/python stuff/file_name.py"

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading