method one:
Direct> python2.7 / python3.6 test.py
Method Two:
On the first line of the file to write #! / Usr / bin / python3
This is the path configuration
You can also find the path through which python3>
then
> chmod +x test.py
>./test.py