renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
326 stars 64 forks source link

Import error: Library not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib #92

Closed billtubbs closed 3 months ago

billtubbs commented 6 years ago

Sorry, I'm not an expert on this.

After uninstalling pygame-1.9.3 with pip uninstall pygame, I installed pygame_sdl2 as instructed in a Python 3.4 environment:

conda install -c https://conda.anaconda.org/kne pygame_sdl2

Which seemed to work.

But got this error when I try to import it in Python:

(py34) BillsMacBookPro:~ billtubbs$ python
Python 3.4.5 | packaged by conda-forge | (default, Sep  8 2016, 14:36:28) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame_sdl2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/billtubbs/anaconda/envs/py34/lib/python3.4/site-packages/pygame_sdl2/__init__.py", line 79, in <module>
    from pygame_sdl2.error import *
ImportError: dlopen(/Users/billtubbs/anaconda/envs/py34/lib/python3.4/site-packages/pygame_sdl2/error.so, 2): Library not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib
  Referenced from: /Users/billtubbs/anaconda/envs/py34/lib/python3.4/site-packages/pygame_sdl2/error.so
  Reason: image not found
>>> 

What is libSDL2-2.0.0.dylib and why was it not found?