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

Current breakage of install due to not specifying dm_control version (or versions for any dependency) #125

Open
peteflorence opened this issue Oct 20, 2021 · 6 comments · May be fixed by #126

Comments

@peteflorence
Copy link

peteflorence commented Oct 20, 2021

Hi folks, a few days ago, this worked, given a working underneath mujoco install:

pip install \
  mujoco_py==2.0.2.5 \
  git+https://github.com/rail-berkeley/d4rl@master#egg=d4rl

Although this repo's master branch hasn't been updated since July, the underlying dm_control dependency version is not specified, and it has since updated to mujoco 2.1: google-deepmind/dm_control@420e237

(which doesn't exist publicly yet: https://www.roboti.us/download.html)

This causes the following error when trying to run install d4rl:

Successfully built mujoco-py d4rl mjrl
Failed to build dm-control
Installing collected packages: mujoco-py, mjrl, dm-control, click, d4rl
    Running setup.py install for dm-control ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1_maoog/dm-control_a87dbf57bef14d5bb352aa0e2a5bcad6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1_maoog/dm-control_a87dbf57bef14d5bb352aa0e2a5bcad6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gr13f_14/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/peteflorence/.local/include/python3.8/dm-control
         cwd: /tmp/pip-install-p1_maoog/dm-control_a87dbf57bef14d5bb352aa0e2a5bcad6/
    Complete output (2 lines):
    running install
    error: Header file '/home/peteflorence/.mujoco/mujoco210/include/mjdata.h' does not exist.

Could someone add versions to all dependencies here? https://github.com/rail-berkeley/d4rl/blob/master/setup.py

Also, to clarify: although one could wait until mujoco 2.1 is available, it still seems that versioning the benchmark is required, or some other mechanism for not ensuring regressions?

@peteflorence peteflorence linked a pull request Oct 20, 2021 that will close this issue
@peteflorence
Copy link
Author

I made a pull request which verions dm_control to a specific hash: #126

But:

  1. Probably all dependencies should be versioned?
  2. I'm not sure if that specific hash should be the one?

@peteflorence
Copy link
Author

Ah, now I see that they changed the website: https://mujoco.org/download

@Harimus
Copy link

Harimus commented Oct 25, 2021

had same issue but adding 210 just caused me this issue in dm_control
google-deepmind/dm_control#210

Edit: as a temporary workaround, setting dm-control==0.0.364896371in setup.py in d4rl worked for me.
Edit2: Probably better with dm-control==0.0.425341097

@saran-t
Copy link

saran-t commented Oct 26, 2021

Can I ask why d4rl is depending on dm_control via git rather than PyPI?

@tfboyd
Copy link

tfboyd commented Nov 14, 2021

I decided to change this comment. I am a bit frustrated; but it is what it is and i knew it was not a good idea to create a dependency (even just fro an experimental test for CQL-SAC) on a github repo vs. at least a published .whl. But it is also a pain to maintain stuff so I totally understand, although being transparent in the README.md seems like a small courtesy I personally would do to set some expectations.

@ethanluoyc
Copy link

I also just want to add an extra piece of info here. Installing dm_control from git can produce weird error messages on a fresh virtual environment due to some build-time dependencies not being met. I created a PR on the dm-control side to silence this. google-deepmind/dm_control#215.

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

Successfully merging a pull request may close this issue.

5 participants