nicklashansen / tdmpc2

Code for "TD-MPC2: Scalable, Robust World Models for Continuous Control"
https://www.tdmpc2.com
MIT License
272 stars 49 forks source link

Error during environment installatin #2

Closed lyshuga closed 7 months ago

lyshuga commented 8 months ago

Hi, thank you for releasing your code.

I was trying to test your code with checkpoints. But there was aproblem occured during the installation of the env. I tried both docker and "conda create env", though the problem is the same. So, the installation takes up to 15-20 mins and after that it fails with error like this:

+ /home/us/anaconda3/envs/tdmpc2/bin/python -m pip install -U -r /home/us/Documents/tdmpc2/docker/condaenv.q8xewkp9.requirements.txt
  Running command git clone --filter=blob:none --quiet https://github.com/Farama-Foundation/Metaworld.git /tmp/pip-req-build-bmsjz7zf
  Running command git rev-parse -q --verify 'sha^04be337a12305e393c0caf0cbf5ec7755c7c8feb'
  Running command git fetch -q https://github.com/Farama-Foundation/Metaworld.git 04be337a12305e393c0caf0cbf5ec7755c7c8feb
  Running command git checkout -q 04be337a12305e393c0caf0cbf5ec7755c7c8feb
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed
Traceback (most recent call last):
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1129, in __call__
    return func(*args, **kwargs)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda_env/cli/main.py", line 80, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda/notices/core.py", line 72, in wrapper
    return_value = func(*args, **kwargs)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda_env/cli/main_create.py", line 156, in execute
    result[installer_type] = installer.install(prefix, pkg_specs, args, env)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda_env/installers/pip.py", line 70, in install
    return _pip_install_via_requirements(*args, **kwargs)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda_env/installers/pip.py", line 53, in _pip_install_via_requirements
    stdout, stderr = pip_subprocess(pip_cmd, prefix, cwd=pip_workdir)
  File "/home/us/anaconda3/lib/python3.9/site-packages/conda_env/pip_util.py", line 41, in pip_subprocess
    raise CondaEnvException("Pip failed")
conda.exceptions.CondaEnvException: Pip failed

I was wondering if you also had issues like this?

nicklashansen commented 8 months ago

Hi @lyshuga, thanks for your interest. According to https://github.com/openai/gym/issues/3176 this seems to be a recent issue with the gym package dependencies. I will see if I can update the installation instructions to accommodate this change. In the mean time, you should be able to resolve the issue by following the suggestions in the gym issue.

nicklashansen commented 7 months ago

Hi again,

I have updated environment.yaml to use the specific package versions suggested by https://github.com/openai/gym/issues/3176, and verified that the installation now succeeds.

I'll close this issue, but please feel free to re-open if you have any additional questions!