【发布时间】:2017-04-18 18:43:00
【问题描述】:
我有一个 wxPython GUI,需要使用 Enthought Python (EDM) 和 Anaconda Python 与 Python 3 一起运行。
问题是,在使用 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 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 可执行文件与 EDM python 3 一起使用?
【问题讨论】:
标签: python python-3.x anaconda enthought