Python pygame error : Failed loading libpng.dylib: dlopen(libpng.dylib, 2): image not found

后端 未结 4 483
粉色の甜心
粉色の甜心 2021-01-02 18:52

I installed the FlapPyBird repo from https://github.com/sourabhv/FlapPyBird. I have libpng installed but when i try to run the program with python flappy.py i get



        
相关标签:
4条回答
  • 2021-01-02 19:08

    I had the same issue. Installing the following with homebrew fixed it:

    brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
    

    Got the info from here:

    http://brysonpayne.com/2015/01/10/setting-up-pygame-on-a-mac/

    0 讨论(0)
  • 2021-01-02 19:16

    Maybe you must install libpng?

    You can do it with homebrew:

    brew install libpng
    
    0 讨论(0)
  • 2021-01-02 19:20

    Try:

    brew unlink libpng && brew link libpng
    

    With me it was some problems with the linking.

    0 讨论(0)
  • 2021-01-02 19:34

    Use python3 interpreter and it will work

    0 讨论(0)
提交回复
热议问题