Skip to content

Fix windows package build rel: issues/17#25

Open
sigman78 wants to merge 7 commits intoFarama-Foundation:masterfrom
sigman78:wincompat
Open

Fix windows package build rel: issues/17#25
sigman78 wants to merge 7 commits intoFarama-Foundation:masterfrom
sigman78:wincompat

Conversation

@sigman78
Copy link
Copy Markdown

@sigman78 sigman78 commented Nov 4, 2025

There are two problems preventing proper windows build:

  • need to provide zlib dependency to cmake
  • declare dll symbol exports (otherwise ale_c.dll built w/o exports at all, unlike linux .so)

In this PR:

  • zlib provided via vcpkg (imo cleaner than using FetchContent logic)
  • "export all" option on libs (normally I would DLL_EXPORT only API, but for now this should work as well)
  • update github action to build windows bdist (unable to test it in a fork's branch :sad-face:)
  • bumper version to 0.1.12

rel #17

@simurgh9
Copy link
Copy Markdown

simurgh9 commented Feb 1, 2026

I forked your repository and installed multi-agent-ale-py from it. I still get this crash,

Traceback (most recent call last):
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_python_interface.py", line 34, in _load_cdll
    return cdll.LoadLibrary(library_path)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 471, in LoadLibrary
    return self._dlltype(name)
           ~~~~~~~~~~~~~^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 390, in __init__
    self._handle = _dlopen(self._name, mode)
                   ~~~~~~~^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tfn\Documents\proj\test.py", line 1, in <module>
    from pettingzoo.atari import pong_v3
  File "<frozen importlib._bootstrap>", line 1412, in _handle_fromlist
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\pettingzoo\atari\__init__.py", line 5, in __getattr__
    return deprecated_handler(env_name, __path__, __name__)
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\pettingzoo\utils\deprecated_module.py", line 60, in deprecated_handler
    spec.loader.exec_module(module)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\pettingzoo\atari\pong_v3.py", line 1, in <module>
    from pettingzoo.atari.pong.pong import env, parallel_env, raw_env
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\pettingzoo\atari\pong\pong.py", line 73, in <module>
    from pettingzoo.atari.base_atari_env import (
    ...<3 lines>...
    )
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\pettingzoo\atari\base_atari_env.py", line 4, in <module>
    import multi_agent_ale_py
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\__init__.py", line 1, in <module>
    from .ale_python_interface import *
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_python_interface.py", line 41, in <module>
    ale_lib = _load_cdll(os.path.dirname(__file__), "ale_c")
  File "C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_python_interface.py", line 36, in _load_cdll
    raise RuntimeError(
        "Failed to load library {}. Attempted to load {}.\n{}".format(
            name, library_path, ex))
RuntimeError: Failed to load library ale_c. Attempted to load C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_c.dll.
Could not find module 'C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.

I checked and C:\Users\tfn\Documents\proj\.venv\Lib\site-packages\multi_agent_ale_py\ale_c.dll definitely exists.

@simurgh9
Copy link
Copy Markdown

simurgh9 commented Feb 2, 2026

The only contents of the file I ran were from pettingzoo.atari import pong_v3 and pip list shows,

pip list
Package              Version
-------------------- -------
chess                1.11.2
cloudpickle          3.1.2
Farama-Notifications 0.0.4
gymnasium            1.2.3
multi-agent-ale-py   0.1.11
numpy                2.4.1
pettingzoo           1.24.3
pip                  25.2
pygame               2.6.1
six                  1.17.0
typing_extensions    4.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants