请不要认为这是重复的。我花了很多时间试图理解类似问题的答案,但不能吸收太多因为我对python和linux文件系统都不熟悉
我有OSX El Capitan 10.11.3和Python 2.7.11。 这显示在我的点子列表中:
wxPython (3.0.2.0)
wxPython-common (3.0.2.0)
导入wx后运行代码(peppy_gui.py)时,出现以下错误:
Traceback (most recent call last):
File "peppy_gui.py", line 3, in <module>
import wx
File "/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py", line 4, in <module>
import _core_
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core_.so, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/wxmac/lib/libwx_osx_cocoau_xrc-3.0.dylib
Reason: image not found
注意:我使用Homebrew
安装了软件包有什么建议吗?