D4RL
D4RL copied to clipboard
Current breakage of install due to not specifying dm_control version (or versions for any dependency)
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: https://github.com/deepmind/dm_control/commit/420e2373d11681f9d78513b16db2ac8b5eb99381
(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?
I made a pull request which verions dm_control to a specific hash: https://github.com/rail-berkeley/d4rl/pull/126
But:
- Probably all dependencies should be versioned?
- I'm not sure if that specific hash should be the one?
Ah, now I see that they changed the website: https://mujoco.org/download
had same issue but adding 210 just caused me this issue in dm_control
https://github.com/deepmind/dm_control/issues/210
Edit: as a temporary workaround, setting dm-control==0.0.364896371
in setup.py
in d4rl worked for me.
Edit2: Probably better with dm-control==0.0.425341097
Can I ask why d4rl is depending on dm_control via git rather than PyPI?
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.
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. https://github.com/deepmind/dm_control/pull/215.