One solution to fix the "-bash: python: command not found" error is to use "python3" instead of "python" to run your Python script. The issue may arise if your system uses Python 3 as the default version, and "python" is not recognized as a command.
Try running your Python script using the following command:
python3 myfile.py
Using "python3" ensures that the system uses the correct Python interpreter, which is often associated with Python 3 installations. This should resolve the issue and allow you to execute your Python script successfully.
I hope this helped!
~~~Harsha~~~