I'm trying to use arac with PyBrain, and when I call net.convertToFastNetwork (), or when I try to import arac.pybrainbridge (import arac works fine), I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pafnouti/Documents/Project/arac/src/python/arac/pybrainbridge.py", line 51, in <module>
import arac.cppbridge as cppbridge
File "/home/pafnouti/Documents/Project/arac/src/python/arac/cppbridge.py", line 31, in <module>
_cppbridge = swig_import_helper()
File "/home/pafnouti/Documents/Project/arac/src/python/arac/cppbridge.py", line 26, in swig_import_helper
_mod = imp.load_module('_cppbridge', fp, pathname, description)
ImportError: libarac.so: cannot open shared object file: No such file or directory
What comes from this code:
try:
fp, pathname, description = imp.find_module('_cppbridge', [dirname(__file__)])
except ImportError:
import _cppbridge
return _cppbridge
if fp is not None:
try:
print fp,"\n", pathname,"\n", description
_mod = imp.load_module('_cppbridge', fp, pathname, description)
print "OK!"
finally:
fp.close()
return _mod
I have the same error if I call _cppbridge import directly. I saw such an error here, so I tried to solve it by saying:
locate libarac.so
/usr/local/lib/libarac.so
Here libarac.so is a link to another place, but even when copying to / usr / local / lib it does not work
ls -l
total 0
lrwxrwxrwx. 1 root root 10 May 23 03:05 libarac.so -> libarac.so
I tried changing LD_LIBRARY_PATH with:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
And / etc / ld.so.conf, adding a new line with / usr / local / lib and calling sudo ldconfig but not changing anything.
NB: I'm on Fedora 20.
, , arac, SConstruct :
swigenv = Environment(SWIGFLAGS=['-python', '-c++', '-outdir', 'src/python/arac'],
CPPPATH=CPPPATH + NUMPYPATH + PYTHONPATH,
LIBS=['arac'],
FRAMEWORKSFLAGS=frameworksflags,
LINKFLAGS=linkflags,
LIBPATH=LIBPATH,
LDMODULEPREFIX='src/python/arac/_',
LDMODULESUFFIX = '.so',
)
swig = swigenv.LoadableModule('cppbridge',
['src/swig/cppbridge.i'])
Depends(swig, lib)