bastienleonard / pysfml-cython

A Python 2/3 binding for SFML 2, written with Cython
http://pysfml2-cython.readthedocs.org/
Other
68 stars 8 forks source link

ImportError: libsfml-******.so.2 #59

Open ErunamoJAZZ opened 11 years ago

ErunamoJAZZ commented 11 years ago

Hello.

The pySFML-cython in Linux (in my Debian Wheezy 64bits) expects to find SFML2 libraries in /usr/lib, but for example, when installing SFML2 from source (cmake -> make -> sudo make install) are installed in /usr/local/lib, and pySFML not found, showing an error like this:

$ python test_pySFML.py 
Traceback (most recent call last):
  File "test_pySFML.py", line 4, in <module>
    import sfml as sf
ImportError: libsfml-graphics.so.2: cannot open shared object file: No such file or directory

This is solved by creating a symbolic link in /usr/lib, but it would be better to find them pySFML also in /usr/local/lib.

shizmob commented 11 years ago

pySFML expects them to be in your dynamic linker path. If you have them installed elsewhere and it can't find them, /usr/local/lib is not in your LD_LIBRARY_PATH, and thus your dynamic linker can't find the libraries. Add /usr/local/lib to your LD_LIBRARY_PATH environment variable to fix this - pySFML is not at fault here.