解决mac中wxpython对64位的支持
今天mac 10.10.5中安装wxpython,安装完wxpython使用import wx导入模块时出现
Traceback (most recent call last):
File "
File "/usr/local/lib/wxPython-3.0.2.0/lib/python2.7/site-packages/wx-3.0-osx_carbon/wx/init.py", line 45, in
from wx._core import *
File "/usr/local/lib/wxPython-3.0.2.0/lib/python2.7/site-packages/wx-3.0-osx_carbon/wx/_core.py", line 4, in
import core
ImportError: /usr/local/lib/wxPython-3.0.2.0/lib/python2.7/site-packages/wx-3.0-osx_carbon/wx/core.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)的错误
解决办法:
将‘defaults write com.apple.versioner.python Prefer-32-Bit -bool yes‘这句话加入到家目录的.bash_profile文件中,然后source .bash_profile文件即可