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

Issue in enviornment setup #3

Closed
rishavb123 opened this issue Sep 27, 2022 · 7 comments
Closed

Issue in enviornment setup #3

rishavb123 opened this issue Sep 27, 2022 · 7 comments

Comments

@rishavb123
Copy link

rishavb123 commented Sep 27, 2022

I followed the setup instructions in the README and when I tried to run the train script with:
python train.py --configs defaults lexa_temporal --task dmc_walker_walk --logdir ~/logdir/lexa_temporal_walker

I got the following error:

Traceback (most recent call last):
  File "train.py", line 9, in <module>
    from dreamer import Dreamer, setup_dreamer, create_envs, count_steps, make_dataset, parse_dreamer_args
  File "/home/ei-lab/rbhagat8/lexa/lexa/dreamer.py", line 27, in <module>
    import wrappers
  File "/home/ei-lab/rbhagat8/lexa/lexa/wrappers.py", line 5, in <module>
    import mujoco_py
  File "/home/ei-lab/miniconda3/envs/lexa/lib/python3.6/site-packages/mujoco_py/__init__.py", line 3, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/home/ei-lab/miniconda3/envs/lexa/lib/python3.6/site-packages/mujoco_py/builder.py", line 510, in <module>
    cymj = load_cython_ext(mujoco_path)
  File "/home/ei-lab/miniconda3/envs/lexa/lib/python3.6/site-packages/mujoco_py/builder.py", line 106, in load_cython_ext
    mod = load_dynamic_ext('cymj', cext_so_path)
  File "/home/ei-lab/miniconda3/envs/lexa/lib/python3.6/site-packages/mujoco_py/builder.py", line 125, in load_dynamic_ext
    return loader.load_module()
ImportError: /home/ei-lab/miniconda3/envs/lexa/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libOSMesa.so.8)

But I was able to fix this using these two commands:
rm ~/miniconda3/envs/lexa/bin/../lib/libstdc++.so.6
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/miniconda3/envs/lexa/bin/../lib/

But after that, when I ran the train script again using the same command as above I got this error:

Traceback (most recent call last):
  File "train.py", line 9, in <module>
    from dreamer import Dreamer, setup_dreamer, create_envs, count_steps, make_dataset, parse_dreamer_args
  File "/home/ei-lab/rbhagat8/lexa/lexa/dreamer.py", line 29, in <module>
    import envs
  File "/home/ei-lab/rbhagat8/lexa-benchmark/envs/__init__.py", line 1, in <module>
    from envs.robobin import RoboBinEnv
  File "/home/ei-lab/rbhagat8/lexa-benchmark/envs/robobin.py", line 8, in <module>
    import metaworld.envs.mujoco.sawyer_xyz.v1 as sawyer
  File "/home/ei-lab/rbhagat8/lexa-benchmark/metaworld/__init__.py", line 7, in <module>
    import metaworld.envs.mujoco.env_dict as _env_dict
ModuleNotFoundError: No module named 'metaworld.envs.mujoco'

I tried reinstalling metaworld with pip install metaworld but it still results in the same error. Any advice?

@orybkin
Copy link
Owner

orybkin commented Sep 27, 2022

Make sure you are following the setup instructions. Do not pip install metaworld; you have to use the version we provide. Since the mujoco module is present in the repo, this error can't happen if you set up the repo correctly.

@rishavb123
Copy link
Author

rishavb123 commented Sep 27, 2022

The error came up before I pip installed metaworld as well.

I ran
conda env create -f environment.yml
conda activate lexa

and then

export PYTHONPATH=~/rbhagat8/lexa/lexa:/home/ei-lab/rbhagat8/lexa-benchmark
export MUJOCO_RENDERER=egl; export MUJOCO_GL=egl
export MJLIB_PATH=~/.mujoco/mujoco200/bin/libmujoco200.so
export MJKEY_PATH=~/.mujoco/mjkey.txt

and then
rm ~/miniconda3/envs/lexa/bin/../lib/libstdc++.so.6
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/miniconda3/envs/lexa/bin/../lib/

to fix the first error above.

After this I used
python train.py --configs defaults lexa_temporal --task dmc_walker_walk --logdir ~/logdir/lexa_temporal_walker
to run the train script and got the meta world error

@orybkin
Copy link
Owner

orybkin commented Sep 27, 2022

Can you verify that metaworld.envs.mujoco is present? Since it is in the repo you should have it as well.

@rishavb123
Copy link
Author

The mujoco folder isn't in the lexa-benchmark repo. I just tried recloning it and got this message:

fatal: packed object 9349e92fd000b33e00fbdcc856d2d7528b17a8ba (stored in ~/lexa-benchmark/.git/objects/pack/pack-3e9847d724f9e099ec4bbe6e66d9c03bcb04bdb9.pack) is corrupt
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

@orybkin
Copy link
Owner

orybkin commented Sep 27, 2022

I cannot replicate this problem. You can manually download a zip from github.

@rishavb123
Copy link
Author

Will do! I'll give that a try and let you know. Thanks for all the help!

@rishavb123
Copy link
Author

Awesome that seemed to fix this problem, thanks! Now, just debugging some cudnn stuff to get the repo running.

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

2 participants