I am using python(2.6.4)-swig(1.3.4) , to access some c++ code that has been compiled into a .so. swig generates some python code that imports the .so with the help of the imp module.
The find_module succeeds and gets the correct path. But the import_module throws up an ImportError.
File "/a/vin31f2/vol/vin31f2v11/cs_ets_03/pradyotd/shadows/testframework/src/MessageRouter/src/swig/MessageFactory.py", line 24, in swig_import_helper
_mod = imp.load_module('_MessageFactory', fp, pathname, description)
ImportError: /a/vin31f2/vol/vin31f2v11/cs_ets_03/pradyotd/shadows/testframework/src/MessageRouter/src/swig/_MessageFactory.so: cannot open shared object file: No such file or directory all
Please note that the file is infact there /a/vin31f2/vol/vin31f2v11/cs_ets_03/pradyotd/shadows/testframework/src/MessageRouter/src/swig/_MessageFactory.so
.
Any suggestions as to how I can solve this?
Also , the same thing seems to run in python 2.6.5 on a different machine