windowsOSを入れなおして久しぶりにvisual studio code開いて、pythonを実行してみても何も表示されなかった。。print(“hi”)すら表示されなかった。
目次
Visual Studio Codeでpythonコード実行しても何も表示されない
インタープリタ選択していなかったのが原因でしたので一応覚書しておこうと思います。
「Select Python Interpreter」のエラーというか警告が出てますね。。ここをクリック

「Enter interpreter path」をクリック

「Find…」をクリック

自身のpython.exeファイルを選択し「インタープリタを選択」をクリック

「▷をクリックしpythonを実行すると無事表示されました。

今回は超初心者向けのちょっとした設定編でした。
ちなみにエディタはMicrosoftのVisual Studio Codeを使用しています。コードを書けるし、様々な言語の補完機能もあり、エディタでスクリプトを動かすこともできるし、エラーも表示してくれるので重宝しています。
当然これだけ機能が充実していると少し重いです。そこだけ注意が必要です。
よければ下記からダウンロードして使用してみるのもいいと思います。