nick_rinaldi
nick_rinaldi

Reputation: 707

Visual Studio Code not displaying any output

I have some code here

enter image description here

I'm simply trying to run, the code, by clicking the Code Runner extension button in the top right corner. Except, when I click that, the only prompt I receive in the terminal is

/Users/Nick/opt/anaconda3/bin/python /Users/Nick/Desktop/cam_reddish_data.py

With no return output. I am using the correct version as my interpreter. I also recently installed anaconda, and am trying to run from that environment, so maybe that's the issue?

Any thoughts?

Upvotes: 1

Views: 1317

Answers (2)

Omar The Dev
Omar The Dev

Reputation: 123

The real reason why

It is because actually that command:

player = player.get_player("Cam", "Reddish", just_id=False)

keeps executing and stops the next lines of code to be excuted, even if you removed that command, hello will be printed in the console. Check if there is any problem in that command

Upvotes: 3

SamuLibero
SamuLibero

Reputation: 21

This way you are not actually running any code.

There are two ways you can run it:

  1. Navigate to your directory with the command cd (changedirectory)

    cd

    cd /Users/Nick/Desktop

    Then run your program with python by typing:

    python cam_reddish_data.py

  2. Run the program without navigating to your directory:

    python ~/Desktop/cam_reddish_data.py

Lmk.

Samu

Upvotes: 2

Related Questions