I know this question has been asked many times but going over all the solutions, none seem to work for me. I'm sure it's something simple I'm missing but I'm out of ideas.
Here is the script:
#!/usr/local/bin python3.6
def print_stuff(user_input):
print(user_input)
def user_input(name=None):
if name is None:
name = input('What is your name: ')
return name
else:
return name
def main():
print_stuff(user_input())
if __name__ == "__main__":
main()
This is obviously super simple and is meant as a test and only to show me that it does execute. When I try to run the script from the terminal, I get a 'command not found' error.
Here is what I know:
Python 3.6
Mac OS X 10.10.5
$ $PATH
-bash: /Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin: No such file or directory
-rwxr-xr-x 1 GeorgeHart staff 304 Oct 12 05:17 methods.py
Here is what I've tried: Shebang at the top of the script, tried with 'python3.6', 'python3', 'python':
#!/usr/local/bin python3.6
#!/usr/local/bin/python3.6
#!/usr/local/bin/ python3.6
#!/usr/bin python3.6
#!/usr/bin/ python3.6
#!/usr/bin/python3.6
#!/usr/bin/env/ python3.6
That last one gives me a directory error. When I navigate to that path, env is not a directory.
Any thoughts would be greatly appreciated. Let me know if more information is needed.