Scripting in Python

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jessica Mayenburg
Posts: 8
Joined: Sun Oct 04, 2020 3:52 pm

Scripting in Python

Post by Jessica Mayenburg » Fri Oct 30, 2020 9:14 am

I am using OpenSim 4.1 on my Windows 10 64 bit system. I am following the tutorial in https://simtk-confluence.stanford.edu:8 ... +in+Python.

I run the code in Anaconda Command Prompt, and receive this message:
Installed c:\users\jess\anaconda3\lib\site-packages\opensim-4.1-py3.8.egg
Processing dependencies for opensim==4.1
Finished processing dependencies for opensim==4.1


When I try to run the import opensim command in Spyder, I receive this output:

import opensim
Traceback (most recent call last):

File "<ipython-input-2-d100d6ac66f2>", line 1, in <module>
import opensim

File "C:\Users\Jess\anaconda3\lib\site-packages\opensim-4.1-py3.8.egg\opensim\__init__.py", line 1, in <module>
from .simbody import *

File "C:\Users\Jess\anaconda3\lib\site-packages\opensim-4.1-py3.8.egg\opensim\simbody.py", line 18, in <module>
_simbody = swig_import_helper()

File "C:\Users\Jess\anaconda3\lib\site-packages\opensim-4.1-py3.8.egg\opensim\simbody.py", line 17, in swig_import_helper
return importlib.import_module(mname)

File "C:\Users\Jess\anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)

ImportError: DLL load failed while importing _simbody: The specified module could not be found.


I have added C:\OpenSim 4.1 to my path, and I have double-checked that I did install the 64-bit version of both OpenSim and Python. Is is possible that I'm missing a DLL? I'm not sure what could be wrong here.

Edited to Add:
I have added C:\Users\Jess\anaconda3\lib\site-packages\opensim-4.1py3.egg\opensim to my path, and also checked the file path to see that there are NO .dll files there. Should there be?

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Scripting in Python

Post by Ayman Habib » Fri Oct 30, 2020 1:42 pm

Hello,

Thanks for reporting, but python version 3.8 is not supported yet by our API bindings, please revert to version 3.7 or earlier. There is an open issue in our development environment to track this.

Sorry for the inconvenience,
-Ayman

User avatar
Jessica Mayenburg
Posts: 8
Joined: Sun Oct 04, 2020 3:52 pm

Re: Scripting in Python

Post by Jessica Mayenburg » Tue Nov 03, 2020 2:08 pm

Re-installed Anaconda with 3.7 and it works!! Thank you

POST REPLY