When I try to run a python script with python3 it does not work but it works when I just use python. Why is this?
I have a simple hello.py file:
__author__ = 'A'
print("hellow")
When I use python ~/path/hello.py with geektool it works, but not with python3 ~/path/hello.py, the same works from terminal.
Also, where can I see geektool's log file?
From the comments, it looks like you have Python 3 installed at /usr/local/bin/python3
. It could be that that's not part of the default PATH
, but you've configured your login shell to add it to the PATH
. Since your other program either executes the program directly or does it through a non-login shell, it won't read that configuration, and the PATH
will remain at its default, excluding that directory. If that's the case, you might have to instead change your command to have an absolute path to Python:
/usr/local/bin/python3 /path/to/hello.py
This should work from the Terminal and any other environments.