Pau*_*son 5 macos wxpython 32bit-64bit
我花了一个非常令人沮丧的夜晚试图wxpython在我的MacBook Pro(运行Snow Leopard 10.6.6)上工作.从这里和其他网站上阅读有关该主题的各种主题,这是我目前的理解:
python在命令行提示符表明,我使用python 2.6.1.which python返回/usr/bin/python所以我使用我的操作系统安装的默认版本.这意味着在命令行提示符下键入以下内容
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes应该将我使用的版本更改为32位版本.wx导入模块),我的文件将成功运行.毫无疑问,我猜测我的文件无法成功运行.我无法弄清楚发生了什么,但也许其他人可以在这里找到一些可能有帮助的其他观察结果......
键入help(),modules产生以下消息,然后打印出模块,包括wx和wxpython
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible.
__import__(name)
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: twisted.flow is unmaintained.
__import__(name)
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future.
warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.")
Fri Jun 3 22:23:48 Paul-Pattersons-MacBook-Pro.local python[3208] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
然后检查wx模块特定产生...
NAME
wx
FILE
/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/__init__.py
有人可以帮忙吗?
Mik*_*oll 11
我没有Mac,但我几乎阅读了wxPython邮件列表中的所有消息.据我了解,您不想使用Mac附带的Python.它已经在某种程度上针对Mac进行了修改,因此您应该下载正常版本的Python并进行安装.
对于32位问题,使用wxPython 2.8,你是对的.由于Carbon API,您仅限于32位.但是,如果您向下滚动下载页面(http://wxpython.org/download.php),您将看到wxPython 2.9已经发布,它有一个Cocoa构建(我引用)"至少需要OSX 10.5,并支持32位或64位架构"和Python 2.7.
我强烈建议你去wxPython邮件列表寻求帮助.wxPython的作者就在那里,他使用了Mac,并且列表中还有其他几个Mac上瘾者可以回答这些问题.
| 归档时间: |
|
| 查看次数: |
658 次 |
| 最近记录: |