allenai / RL4LMs

A modular RL library to fine-tune language models to human preferences
https://rl4lms.apps.allenai.org/
Apache License 2.0
2.18k stars 191 forks source link

Pip install error with gym and torch #64

Open BaleChen opened 1 year ago

BaleChen commented 1 year ago

Hi, I encountered this error when pip installing the rl4lm library using pip install -e . The message says

'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.

I found the solution to be first do pip install setuptools==65.5.0 pip==21, or even earlier versions according to this issue, though I suspect downgrading pip is not necessary.

As for torch=1.11.0, it is a relatively old package and seems to not support the latest version of Python. I didn't see you indicate your Python version so it would be nice to share it with everyone so that they won't encounter this dependency error. I downgraded from 3.11 to 3.8 and the error resolves.

Hope someone can have a look at this and see if it's my mistake or worth a PR.

gopstrit commented 1 year ago

You saved my day. Only had to pip install setuptools==65.5.0.

But, got an "ERROR: Could not find a version that satisfies the requirement pywin32==227" later on.

Will post the update if I manage to resolve that.

BaleChen commented 1 year ago

Did you try downgrading your python version?

FYYFU commented 4 months ago

issue this is the issue to solve opencv-python>=3. error.