python's DLLs on Windows 10

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mohsen Sharifi Renani
Posts: 7
Joined: Thu Apr 12, 2018 1:00 pm

python's DLLs on Windows 10

Post by Mohsen Sharifi Renani » Mon Oct 12, 2020 3:09 pm

Hi,
I'm trying to use Opensim python on Window 10, 64bit. I followed the instruction (Installing Anaconda and the "opensim" Python package). SDK installed correctly but it still keep giving me this error.
My python is 3.7 and ANACONDA 3. I found similar error here, https://github.com/opensim-org/opensim-core/issues/1482. I double check the environment path and opensim bin has been in my system environment


User variable:
Path --> C:\OpenSim 4.1\bin

System variable:
path --> F:\opensim-moco-0.4.0-win\bin
path --> C:\OpenSim 4.1\bin


Code: Select all

Traceback (most recent call last):

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

  File "C:\Users\Mohsen\Anaconda3\lib\site-packages\opensim-4.1-py3.7.egg\opensim\__init__.py", line 6, in <module>
    from .tools import *

  File "C:\Users\Mohsen\Anaconda3\lib\site-packages\opensim-4.1-py3.7.egg\opensim\tools.py", line 18, in <module>
    _tools = swig_import_helper()

  File "C:\Users\Mohsen\Anaconda3\lib\site-packages\opensim-4.1-py3.7.egg\opensim\tools.py", line 17, in swig_import_helper
    return importlib.import_module(mname)

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

ImportError: DLL load failed: The specified procedure could not be found.

Any help would be appreciated.
Thanks,
Mohsen

Tags:

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

Re: python's DLLs on Windows 10

Post by Ayman Habib » Mon Oct 12, 2020 3:12 pm

Hello,

Moco distributions include a copy of the OpenSim libraries so for now you have to choose one and remove the other from your path.

Hope this helps,
-Ayman

User avatar
Mohsen Sharifi Renani
Posts: 7
Joined: Thu Apr 12, 2018 1:00 pm

Re: python's DLLs on Windows 10

Post by Mohsen Sharifi Renani » Mon Oct 12, 2020 4:24 pm

Hellow Ayman,

Thank you for the response and help.
Now, it's working only on Spyder. I've been working with PyCharm and Virtual Env. I still was not successful to call it in pycharm virtual environment.

Any suggestion?

Thanks,
Mohsen

User avatar
Mohsen Sharifi Renani
Posts: 7
Joined: Thu Apr 12, 2018 1:00 pm

Re: python's DLLs on Windows 10

Post by Mohsen Sharifi Renani » Wed Oct 21, 2020 10:56 am

Hi,

I was able to run it on pycharm virtual environment as well. just have to activate evn and then, go to opensim dir: cd C:\OpenSim 4.0\sdk\Python, and finally run "python setup.py install" in you evn.

Thanks,
Mohsen

POST REPLY