Error related to scripting in python
Posted: Wed Oct 28, 2020 9:32 am
Dear OpenSim expert
I am trying to use opensim scripting in python. I followed the instruction (Installing Anaconda and the "opensim" Python package, which can be found in website: https://simtk-confluence.stanford.edu:8 ... +in+Python) to setup the python scripting environment step by step. After that, when I run "import opensim" in python, it gave the following error:
Traceback (most recent call last):
File "D:\Xijin Hua_Cambridge project\Multibody dynamics model_ankle orthosis\Model_20201018_Gait simulation\Python programme\RRAModelModification.py", line 1, in <module>
import opensim
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\__init__.py", line 1, in <module>
from .simbody import *
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\simbody.py", line 18, in <module>
_simbody = swig_import_helper()
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\simbody.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: DLL load failed: The specified module could not be found.
[Finished in 0.224s]
I used 64-bit OpenSim and 64-bit python, and have set the OpenSim's DLLs on the Path:
User variable:
Path --> C:\OpenSim 4.1\bin
System variable:
path --> C:\OpenSim 4.1\bin
Could you please tell me how to solve this problem? Thank you very much in advance.
Best regards
Xijin
I am trying to use opensim scripting in python. I followed the instruction (Installing Anaconda and the "opensim" Python package, which can be found in website: https://simtk-confluence.stanford.edu:8 ... +in+Python) to setup the python scripting environment step by step. After that, when I run "import opensim" in python, it gave the following error:
Traceback (most recent call last):
File "D:\Xijin Hua_Cambridge project\Multibody dynamics model_ankle orthosis\Model_20201018_Gait simulation\Python programme\RRAModelModification.py", line 1, in <module>
import opensim
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\__init__.py", line 1, in <module>
from .simbody import *
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\simbody.py", line 18, in <module>
_simbody = swig_import_helper()
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\site-packages\opensim-4.1-py2.7.egg\opensim\simbody.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\xh308\AppData\Local\Continuum\anaconda2\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: DLL load failed: The specified module could not be found.
[Finished in 0.224s]
I used 64-bit OpenSim and 64-bit python, and have set the OpenSim's DLLs on the Path:
User variable:
Path --> C:\OpenSim 4.1\bin
System variable:
path --> C:\OpenSim 4.1\bin
Could you please tell me how to solve this problem? Thank you very much in advance.
Best regards
Xijin