MAC下如何安装 wxPython
MAC OS 10.8.3 因为系统是64位,安装后import wx 提示如下错误:
ImportError: /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/core.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
设置如下即可正常:
在当前用户目录 vim ~/.profile
加入
export VERSIONERPYTHONPREFER32BIT=yes
或者临时在当前终端输入:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes