【发布时间】:2014-06-27 06:52:11
【问题描述】:
我在 MacOS 10.9.2 上安装了 Enthought Canopy 1.4。尝试运行 winpdb 调试器会导致以下消息:
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.
作为一种解决方法,我尝试创建一个 shell 脚本 run.sh,其中包含
PYVER=2.7
PYTHON=/System/Library/Frameworks/Python.framework/Versions/$PYVER/bin/python$PYVER
# find the root of the virtualenv, it should be the parent of the dir this script is in
ENV=`$PYTHON -c "import os; print os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..'))"`
export PATH=$OLD_PATH
# now run Python with the virtualenv set as Python's HOME
export PYTHONHOME=$ENV
exec $PYTHON "$@"
尝试运行./run.sh winpdb 会导致错误消息
ImportError: No module named site
我的问题似乎与
Running wxPython 2.9 on OS X 10.8 (64 bit),
但那里的解决方案似乎不适用,因为我似乎没有像/Library/Frameworks/EPD64.framework/... 这样的东西,即任何连接到 Canopy 或 EPD 的框架
【问题讨论】:
标签: python wxpython enthought canopy