在我的终端和 CodeRunner 中,我的 Python 已更新到 2.7.6,但是当我在 OSX Automator 中运行 shell 脚本时,我发现它正在运行 2.7.2
如何像其他编译器一样将 Automator Python 更新到 2.7.6?
最佳答案
我无法明确指定它使用哪个Python。 因此,我使用以下命令在 bash 环境中运行它:
$ your/python/path/path/to/your/python/script.py
并确保 python 程序的第一行包含您要使用的 python 环境的路径。 例如:
#!/usr/local/bin/python
关于python - 指定 Automator 中运行哪个版本的 Python?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20505085/