Page 1 of 1

python's DLLs on Windows 10

Posted: Mon Oct 12, 2020 3:09 pm
by mohsensh91
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

Re: python's DLLs on Windows 10

Posted: Mon Oct 12, 2020 3:12 pm
by aymanh
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

Re: python's DLLs on Windows 10

Posted: Mon Oct 12, 2020 4:24 pm
by mohsensh91
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

Re: python's DLLs on Windows 10

Posted: Wed Oct 21, 2020 10:56 am
by mohsensh91
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