Issue with executing a Python script [bad interpreter]

Viewed 119

I am trying to execute a Python script that returns the following error message.

zsh: ./test.py: bad interpreter: /usr/bin/python: no such file or directory

I suspected this to be an issue with the Python client version I am using and to overcome that, I have upgraded the Python version. The current version of Python I am using is 3.9.7 and the OS is MacOS. This didn't help.

I have referred to the Apple support pages, especially https://developer.apple.com/forums/thread/703091. However, the issue remains the same. It would be of great help if someone explains the reason behind this error pattern.

0 Answers
Related