1

我正在尝试为 IDLE 安装IdleX扩展。无论我是从命令行python idlex.py还是从 Python Launcher 运行安装程序,我都会收到相同的错误:

$ cd '/Volumes/Pig/Users/arrow/Downloads/idlex-1.11.1/' && 
'/usr/local/bin/pythonw' 
'/Volumes/Pig/Users/arrow/Downloads/idlex-1.11.1/idlex.py'  && 
echo Exit status: $? && exit 1

Oct 15 20:00:29 Niflheimr.local Python[45309] <Error>: 
kCGErrorInvalidConnection: CGSGetWindowTags: Invalid connection

Oct 15 20:00:29 Niflheimr.local Python[45309] <Error>: 
kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() 
to catch errors as they are logged.

我在 Mac OS 10.7.5 上运行适用于 Mac 的 Python 2.6 包

4

2 回答 2

0

这看起来像是 Tkinter 的问题。请参阅此站点: http: //www.python.org/download/mac/tcltk/

启动 IDLE 本身是否正常工作?您可以使用以下命令启动它:

python -m idlelib.idle
于 2012-10-17T22:32:20.240 回答
0

我假设您已经从空闲站点下载了 zip。要安装扩展,您需要解压缩并运行

python setup.py install 

你会有类似的视觉效果

python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/idlexlib
copying idlexlib/__init__.py -> build/lib.linux-x86_64-2.7/idlexlib
copying idlexlib/launch.py -> build/lib.linux-x86_64-2.7/idlexlib
copying idlexlib/extensionManager.py -> build/lib.linux-x86_64-2.7/idlexlib

可能遇到的错误:

error: could not create '/usr/local/lib/python2.7/dist-packages/idlexlib': Permission denied

如果出现permission denied错误:在命令中使用root权限

干杯

于 2015-02-04T06:16:53.970 回答