Hoping you could help me I'm posting the problem I have when compiling OpenSim 3.2 on Mac,
Everything works fine, building Simbody 3.3.1 and OpenSim itself, the only problem is that when I try to compile it with Python Wrapper, and I use the python routine setup.py, It generates everything BUT
the library which is generated is "_opensim.dylib".
Now, apparently, for some odd bug in python, when you try to type "import opensim" in python, it lopensim.py is not able to load the "_opensim" module like he can't find the library.
In particular the problem is in the line:
Code: Select all
fp, pathname, description = imp.find_module('_opensim', [dirname(__file__)])
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "opensim.py", line 26, in <module>
_opensim = swig_import_helper()
File "opensim.py", line 18, in swig_import_helper
import _opensim
ImportError: No module named _opensim
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/opensim-3.2-py2.7.egg/opensim/__init__.py", line 1, in <module>
from opensim import *
File "/Library/Python/2.7/site-packages/opensim-3.2-py2.7.egg/opensim/opensim.py", line 26, in <module>
_opensim = swig_import_helper()
File "/Library/Python/2.7/site-packages/opensim-3.2-py2.7.egg/opensim/opensim.py", line 22, in swig_import_helper
_mod = imp.load_module('_opensim', fp, pathname, description)
ImportError: dynamic module does not define init function (init_opensim)
Is there a way around this? I thought if it could be possible to compile directly as .so instead of .dyliv but I don't know where to look for.
As it is now, It looks like for mac the python module does not work, and now I'm really out of options.
I would appreciate any help,
thanks
Marco