pythonw缺失,伴着沉思';Python 3的s发行版
我有一个wxPython GUI,它需要同时使用Enthound Python(EDM)和Anaconda Python与Python3一起运行 问题是,在使用Anaconda Python时,我必须使用pythonw,否则脚本会因以下错误而失败:pythonw缺失,伴着沉思';Python 3的s发行版,python,python-3.x,anaconda,enthought,Python,Python 3.x,Anaconda,Enthought,我有一个wxPython GUI,它需要同时使用Enthound Python(EDM)和Anaconda Python与Python3一起运行 问题是,在使用Anaconda Python时,我必须使用pythonw,否则脚本会因以下错误而失败: This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the
This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac.
在前面,我使用Python 2.x解决了这个问题,方法是指定:
#/usr/bin/env pythonw
这对Canopy Python 2和Anaconda Python 2都有效
然而,EDM Python 3似乎缺少pythonw.exe,因此我必须编辑shebang行以
#/usr/bin/env python
让我的脚本与EDM python 3一起运行
那么,有没有一种方法可以将pythonw可执行文件与edmpython3一起使用呢 当然。只需创建一个名为
pythonw
的脚本,并将其放入$PATH
:
#!/bin/sh
exec /usr/bin/env python "$@"