stanfordnmbl / osim-rl

Reinforcement learning environments with musculoskeletal models
http://osim-rl.stanford.edu/
MIT License
877 stars 248 forks source link

module opensim or osim not found #218

Closed libphy closed 4 years ago

libphy commented 4 years ago

Hello,

I've tried to install opensim with python 3.7 and 3.8 (somehow 3.6 doesn't seem to be available with the default channel- not sure which channel to use) and got following result. conda env with opensim+py3.7: importing opensim and osim doesn't work. conda list shows opensim 4.0 but no osim. conda env with opensim+py3.8: importing opensim doesn't work whereas osim works. But when I run a sample script from this site https://github.com/stanfordnmbl/osim-rl it throws error because of opensim. What's the difference between opensim and osim BTW? conda list shows both opensim and osim in this environment. Can anyone give some suggestion? Thanks,

kidzik commented 4 years ago

Currently the binaries I compiled only support python=3.6.1. Have you tried simply following the exact versions as described in https://github.com/stanfordnmbl/osim-rl#getting-started ? It's definitely possible to run it with different versions but it may require recompiling opensim

Opensim is a physics engine here with python wrappers exposed. Osim is a lightweight python package (implemented in this repository) that defines an OpenAI gym-compatible RL environment in OpenSim.

libphy commented 4 years ago

I see. Thank you. When I tried to get python 3.6.1, I could not find the right distribution/channel so the installation aborted. I'll try to search more- if you know where by chance, please let me know.

libphy commented 4 years ago

Update on this: I've downloaded python 3.6.1 source file and tried to build, but that doesn't work either (version 3.6.1 doesn't install). Do you have opensim & osim built for python 3.7.x or 3.8.x? Or do you have other suggestions? Thanks!

kidzik commented 4 years ago

Right, it seems 3.6.1 is not available in the main channel anymore. I've managed to install it from conda-forge. Please try

conda create -n opensim-rl -c kidzik -c conda-forge opensim python=3.6.1
source activate opensim-rl
pip install osim-rl
libphy commented 4 years ago

Awesome! It worked. Thank you so much!