【问题标题】:OSX PyGame Failed loading libpng.dylib: dlopen(libpng.dylib, 2)OSX PyGame 加载 libpng.dylib 失败:dlopen(libpng.dylib, 2)
【发布时间】: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)

标签: python macos pygame


【解决方案1】:

在终端中使用 python3 解释器 例如python3 xx.py

【讨论】:

    猜你喜欢
    • 2016-12-03
    • 1970-01-01
    • 2014-11-21
    • 2019-05-12
    • 2018-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多