ctypes
isn't finding libraries installed via fink, which live under /sw/lib/
, unless I explicitly give the full path to the libraries
>>> import ctypes
>>> ctypes.CDLL('libgoffice-0.8.dylib')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sw/lib/python2.7/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgoffice-0.8.dylib, 6): image not found
>>> ctypes.CDLL('/sw/lib/libgoffice-0.8.dylib')
<CDLL '/sw/lib/libgoffice-0.8.dylib', handle 336500 at 2b10b0>
>>>
Compilation against these libraries with gcc
, however, works fine; they are always found. Why isn't ctypes
locating these libraries, and what can I do to make it locate them?
This is on OS X 10.6.8 with fink-installed Python 2.7 under /sw/bin/python2.7
.