0

I'm using mac air m2 now and I'm trying to use python in vscode. I downloaded python from vscode, created a file called 1.py, and entered the command 1 + 1

[Running] python -u "/Applications/securety/programming/Python coding/1.py"
/bin/sh: python: command not found

[Done] exited with code=127 in 0.009 seconds

got this error

How can I fix the error?

I also downloaded python and python extension pack from vs code

6
  • python from vscode is an extension for the editor... Have you installed python in your system? what do you get if you enter python in the terminal? Commented Dec 12, 2022 at 4:31
  • still the same error Commented Dec 12, 2022 at 4:32
  • try installing python in your system separate from vscode, also test adding #!/usr/bin/env python3 as the first line in your code Commented Dec 12, 2022 at 4:32
  • Can this answer solve your issue? Commented Dec 12, 2022 at 5:24
  • you could try running the same command on a virtual environment because you set global modules and install libraries by reserving a new python core program from scratch to use later, if not try to fix your python instalation path Commented Dec 12, 2022 at 5:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.