Farama-Foundation / PettingZoo

An API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities
https://pettingzoo.farama.org
Other
2.57k stars 408 forks source link

[Question] Installation Issues with Multi-agent-ale-py Library for Pettingzoo[Atari] #1072

Closed AkgunOnur closed 1 year ago

AkgunOnur commented 1 year ago

Question

Dear team,

I am encountering a challenge while attempting to install the multi-agent-ale-py library, which is crucial for the pettingzoo[atari] environments. I have tried installations on both Python 3.9 and 3.10 environments on Windows 11, yet I consistently receive the following error output:

C:\Users\onur_\miniconda3\envs\py39\lib\site-packages\setuptools\command\build_py.py:201: _Warning: Package 'multi_agent_ale_py.tests.fixtures' is absent from the `packages` configuration.

subprocess.check_call(
        File "C:\Users\onur_\miniconda3\envs\py39\lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\onur_\\AppData\\Local\\Temp\\pip-install-ocskue_3\\multi-agent-ale-py_be2d67067fa3464aa2eb7e4295cc0754', '-DOUTPUT_NAME=multi_agent_ale_py.libale_c', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\onur_\\AppData\\Local\\Temp\\pip-install-ocskue_3\\multi-agent-ale-py_be2d67067fa3464aa2eb7e4295cc0754\\build\\lib.win-amd64-cpython-39\\multi_agent_ale_py', '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\onur_\\AppData\\Local\\Temp\\pip-install-ocskue_3\\multi-agent-ale-py_be2d67067fa3464aa2eb7e4295cc0754\\build\\lib.win-amd64-cpython-39\\multi_agent_ale_py', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build\\temp.win-amd64-cpython-39\\Release', '-DPYTHON_MODULE_EXTENSION=.dll', '-DUSE_SDL=OFF', '-DUSE_RLGLUE=OFF', '-DBUILD_EXAMPLES=OFF', '-DBUILD_CPP_LIB=OFF', '-DBUILD_CLI=OFF', '-DBUILD_C_LIB=ON', '-A', 'x64']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for multi-agent-ale-py
  Running setup.py clean for multi-agent-ale-py
Failed to build multi-agent-ale-py
ERROR: Could not build wheels for multi-agent-ale-py, which is required to install pyproject.toml-based projects

Your assistance would be greatly appreciated. Best regards,

elliottower commented 1 year ago

Unfortunately this is an existing problem with the multi-agent-ale-py library, see https://github.com/Farama-Foundation/Multi-Agent-ALE/issues/17

In good news, the arcade learning environment (ALE-py) has joined Farama and we plan to combine multi-agent and regular ALE into the same package, and make it much more reliable and maintainable. So hopefully this should be fixed in the future.

The workaround is to use windows subsystem for linux, which I would recommend in general for any development work on windows as it makes things so much simpler in terms of managing dependencies and ensuring your code works in clusters/CI/etc

AkgunOnur commented 1 year ago

Thanks for the response. It works fine in Ubuntu.

elliottower commented 1 year ago

Good to hear, cheers

laoyouf commented 9 months ago

Good to hear, cheers

hello, Is there any update for Windows?

elliottower commented 9 months ago

Not yet as far as I am aware. The ALE library is now a part of the farama foundation and it is planned to be integrated with the multi agent ALE envs and be cleaned up, but that will take time.

If you or anyone wants to submit a PR fixing windows installation feel free, but we don’t have much bandwidth to do it ourselves. You can now test windows machines in GitHub workflows so it’s possible.

matteobettini commented 8 months ago

+ 1 on a solution.

This is preventing windows users to call

from pettingzoo.utils.all_modules import all_environments

and thus load environments programmatically. Which we do in TorchRL and BenchMARL (https://github.com/facebookresearch/BenchMARL/issues/41)

elliottower commented 8 months ago

Hi Matteo, I can look into the multi-agent-ale thing on my windows machine and see if I can get it to work, but I'm not very well versed in c++ wrapped in python which is what that library is comprised of. PettingZoo (and pretty much all other farama projects) does not natively support windows, but now that GitHub allows you to do windows workflows I have added some windows tests to chatarena for example, so if this is something that is important to you and other users I can try to look into it.

As always, we are very happy to accept PRs fixing this and any other issues, feel free to suggest any other ways to alleviate the problem temporarily as well (e.g., the different environment imports could be under a try catch so you can still run from pettingzoo.utils.all_modules import all_environments but it would give a warning that only some subset of the environments were imported)