I have a shell script in mac below:
python Test.py
and Test.py is below:
import subprocess
import os.path
from os import listdir
from os.path import isfile, isdir, join
from filecmp import dircmp
import json
import sys
import shutil
....(skip)
and I execute "python Test.py" in Mac Terminal,it's ok. but I execute "./Test.sh" it will get error below:
./Test.py: line 1: import: command not found
./Test.py: line 2: import: command not found
from: can't read /var/mail/os
from: can't read /var/mail/os.path
from: can't read /var/mail/filecmp
./Test.py: line 6: import: command not found
./Test.py: line 7: import: command not found
./Test.py: line 8: import: command not found