HumanCompatibleAI / overcooked_ai

A benchmark environment for fully cooperative human-AI performance.
https://arxiv.org/abs/1910.05789
MIT License
683 stars 144 forks source link

Errors related to module 'ray' #133

Closed call-me-anything-you-want closed 9 months ago

call-me-anything-you-want commented 9 months ago

I'm trying to build the environment from source, following the guidance in README.md. After running

conda create -n overcooked_ai python=3.7
conda activate overcooked_ai
git clone https://github.com/HumanCompatibleAI/overcooked_ai.git
cd overcooked_ai
pip install -e .
python testing/overcooked_test.py

The code raised an error:

ModuleNotFoundError: No module named 'ray'

I tried to solve it using

pip install -U "ray[rllib]"

The error message changed to

ModuleNotFoundError: No module named 'ray.rllib.agents'

The version of my python is 3.7.12 and the version of ray is 2.7.1 How can I solve this problem?

jyan1999 commented 9 months ago

Hey there,

Could you try running this command here : pip install -e overcooked_ai[harl], instead of pip install -e .

This command installs several other dependencies specific for training and some other tasks, and the code uses an old version of ray so it probably has some mismatch with newer versions of ray.

call-me-anything-you-want commented 9 months ago

Hey there,

Could you try running this command here : pip install -e overcooked_ai[harl], instead of pip install -e .

This command installs several other dependencies specific for training and some other tasks, and the code uses an old version of ray so it probably has some mismatch with newer versions of ray.

Thanks for your help, but where should I run this command? I tried running it in the "overcooked_ai" directory and its parent directory, but got the same error as follow:

zsh: no matches found: overcooked_ai[harl]
jyan1999 commented 9 months ago

You should run the command in the directory where you cloned the repo. If you have cd'ed into the repo directory, you should do pip install -e .[harl]. Let me know if this works.

call-me-anything-you-want commented 9 months ago

You should run the command in the directory where you cloned the repo. If you have cd'ed into the repo directory, you should do pip install -e .[harl]. Let me know if this works.

I got a similar error as before

zsh: no matches found: .[harl]
jyan1999 commented 9 months ago

hmmm weird, I haven't seen this error before in this context. Maybe try quoting it like pip install -e "overcooked_ai[harl]", or pip install -e ".[harl]". It looks like your shell is somehow interpreting the brackets as pattern-matching expression.

call-me-anything-you-want commented 9 months ago

Wow! It works! I've passed all two tests mentioned in README.md Many thanks!