I try to work with the OpenSim python wrapping. To run OpenSim-core-installation via python3 wrapping in an anaconda environment I installed OpenSim-Core following the procedure for MacOS with superbuild using Cmake and Xcode. The following problem occurs trying to import opensim:
Code: Select all
ImportError: dlopen(/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/_simbody.so, 2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
But maybe this is a wrong interpretation of this error report
Please help!
Thanks a lot, Philippe
complete error code:
Code: Select all
(simenv) ip184103:~ philippewesberg$ python
Python 3.7.3 (default, Mar 27 2019, 16:54:48)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import opensim
Traceback (most recent call last):
File "/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/simbody.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/Applications/anaconda3/envs/simenv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/_simbody.so, 2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/_simbody.so
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/__init__.py", line 1, in <module>
from .simbody import *
File "/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/simbody.py", line 17, in <module>
_simbody = swig_import_helper()
File "/Applications/anaconda3/envs/simenv/lib/python3.7/site-packages/opensim-4.0-py3.7.egg/opensim/simbody.py", line 16, in swig_import_helper
return importlib.import_module('_simbody')
File "/Applications/anaconda3/envs/simenv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_simbody'
>>>