【发布时间】:2016-08-28 08:56:52
【问题描述】:
我在使用 Python 2.7 在 OSX (10.11.6) 上运行程序时收到此错误 pygame.error: Failed loading libpng.dylib: dlopen(libpng.dylib, 2): image not found
我已尝试关注this,但运气不佳,而且我似乎在这个问题上找不到更多其他信息。对此的任何帮助将不胜感激。
【问题讨论】:
-
在终端中运行
echo $DYLD_LIBRARY_PATH时的输出是什么? (它应该是空的。) -
因为您的 DYLD_LIBRARY_PATH 可能是永久设置的——例如,在您的 ~/.bash_profile 中——即almost always an indication that you are doing something wrong。
-
@jkdev 我运行时没有输出
-
好的,所以这不是问题。
-
您的系统上是否安装了 libpng? (运行 Finder 搜索名称匹配项:libpng)