0

Facing issues with Vsc Code Runner, unable to run python code using Code Runner. Works fine when clicked on Run Python Code button

I get an error

zsh: no such file or directory: /usr/local/bin/python3.9.2

I have identified the error, need to change the run command from

python -u

to

python3 -u

How do I do that?

0

2 Answers 2

0

First, make sure that you have installed the python extension. Secondly, this should be caused by the error of interpreter path recognition. You can modify it manually. Type ctrl+shift+P and then choose “python:select Interpreter”. Check that the Python interpreter has selected the correct one, and then run the file again.

Sign up to request clarification or add additional context in comments.

Comments

0

Go to the Code Runner extension settings, there you would find Code-runner: Executor Map now click on the edit in settings.json of it, replace "python": "python -u" with "python": "python3 -u"

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.