put this in the first line of your script:
#!/usr/bin/env python
Make the file executable with
chmod +x myfile.py
Execute with
./myfile.py
# in Python script file, write in first line:
#!/usr/bin/env Python3
# mark your file as executable, in Bash type:
chmod +x HelloWorld.py
# now can execute file with ./ for relative path, instead of using python3
./HelloWorld.py