Specify which version of Python runs in Automator?

青春壹個敷衍的年華 提交于 2021-02-07 09:43:01

问题


In my terminal and in CodeRunner my Python is updated to 2.7.6 but when I ran a shell script in the OSX Automator I found that it is running 2.7.2

How can I update the Automator Python to 2.7.6 like the rest of my compilers ?


回答1:


I couldn't specify explicitly which python for it to use. So, I ran it in bash environment with following command:

$ your/python/path /path/to/your/python/script.py

And make sure first line of your python program contains the path to the python environment you wish to use. Eg:

#! /usr/local/bin/python



来源:https://stackoverflow.com/questions/20505085/specify-which-version-of-python-runs-in-automator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!