Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I just upgrade the gym and mujoco, then my code can not use #244

Closed
ruoqizzz opened this issue Apr 14, 2018 · 9 comments
Closed

I just upgrade the gym and mujoco, then my code can not use #244

ruoqizzz opened this issue Apr 14, 2018 · 9 comments

Comments

@ruoqizzz
Copy link

self.model = mujoco_py.load_model_from_path(fullpath)
AttributeError: 'module' object has no attribute 'load_model_from_path'

gym: 0.10.5
mujoco-py:0.5.7

@ruoqizzz
Copy link
Author

If I change .mujoco/mjpro131 to mjpro150, the Error is:

mujoco_py.error.MujocoDependencyError: Found your MuJoCo license key but not binaries. Please put your binaries into ~/.mujoco/mjpro131 or set MUJOCO_PY_MJPRO_PATH. Follow the instructions on https://github.com/openai/mujoco-py for setup.

how to set the MUJOCO_PY_MJPRO_PATH?

@ruoqizzz
Copy link
Author

Okay, now I change the env.
Now:
python 3.6, mujoco 0.5.7 with the mjpro131 package installed and gym 0.9.1

It works, but I still don't know why it doesn't work if I upgrade the gym and mujoco-py.

@hangwudy
Copy link

Hello, how to install gym 0.9.1? I mean, it will automatically install the newest version with

git clone https://github.com/openai/gym.git
cd gym
pip install -e .

@IcarusWizard
Copy link

@henrywood2018
Hi, you can simply get gym 0.9.1 with pip. Trypip install gym==0.9.1

@LiDuan1111
Copy link

LiDuan1111 commented Jul 5, 2018

$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import mujoco_py
from os.path import dirname
model = mujoco_py.load_model_from_path(dirname(dirname(mujoco_py.file)) +"/xmls/claw.xml")

Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'mujoco_py' has no attribute 'load_model_from_path'

Hello~The problem is still here!
gym:0.9.1
mujoco:mjpro131
mujoco_py:0.5.7
Who can tell me how to solve it !....

@DongChen06
Copy link

@LiDuan1111 Hi, do you know how to solve this problem?

@Liliduan
Copy link

@LiDuan1111 Hi, do you know how to solve this problem?

I changed the version of gym and mujoco_py since the CPU of my computer was old. Specific configuration is as below:

python: 3.6
Tensorflow:1.5.0
Gym: 0.9.1
mujoco: 131
mujoco_py:0.5.7

Good luck~

@DongChen06
Copy link

By long term trail, I solved the problem. By using gym=0.10.5, mujoco-py=2.0.2.1, tensorflow =1.13.1, and mujoco200. My Path looks like this,

#export LD_LIBRARY_PATH=~/.mujoco/mjpro131/bin${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=~/.mujoco/mjpro200/bin${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dong/.mujoco/mujoco200/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-384
export MUJOCO_KEY_PATH=~/.mujoco${MUJOCO_KEY_PATH}

Using low version of gym, may cause prolem like:
ImportError cannot import name FlattenDictWrapper, When I upgrade it from 0.9.1 to 0.10.5, problems gone.

Another Problem is "AttributeError:module 'mujoco_py' has no attribute 'load_model_from_path'', I solved it by using a higher version of mujoco-py and mujoco200 rather than mujoco131 and mujoco-py=0.5.7, and added the PATH.

Hope helpful!

@R-Ceph
Copy link

R-Ceph commented Aug 30, 2020

I got the same problem, and I just added mjpro131 in ~/.mujoco as well, since there could be different versions of mujoco at the same time under ~/.mujoco
Specific configuration is as below:

python: 3.6
Tensorflow:1.4.0
Gym: 0.10.6
mujoco: 131
mujoco_py:2.0.~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants