xlang-ai / text2reward

[ICLR 2024] Code for the paper "Text2Reward: Automated Dense Reward Function Generation for Reinforcement Learning"
https://text-to-reward.github.io/
114 stars 6 forks source link

Require 2 python versions? #1

Open leo-liuzy opened 10 months ago

leo-liuzy commented 10 months ago

I am setting up the environment.

What I found is that in the setup tutorial, you have conda create -n text2reward python=3.7

However, langchain which is used in text2reward/code_generation/single_flow/*/generation.py requires 3.8.

installing with 3.7

If I am installing langchain with 3.7. It will not install langchain.chat_models and langchain.callbacks.manager and making the code-generation no runnable.

installing with 3.8

This will make the following part not runnable (Using python3.7 doesn't have this issue)

cd ManiSkill2
pip install -e .
pip install stable-baselines3==1.8.0 wandb tensorboard

For the above install, I will get

Preparing metadata (setup.py) ... error
  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.

I try to fix 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.. But following here doesn't make things working.

Timothyxxx commented 10 months ago

You are right, I tried to reproduce and found this issue as well. It's a conflict caused by mujoco (which requires a lower version of python) and langchain (which requires a higher version of python, moving very fast), we will update and fix this error.