Conversation
|
Hi @visheshrwl , does this replace #1422 ? |
|
I'm quite impressed that you got this to work! It's been a major feature request for the past 3 years. However, there is one thing we need to discuss before I take a deeper look ifwe import this and "officially" support Windows OpenSpiel via pip. We unfortunately don't have resources to properly support Windows (without external help). If we put up Windows pip wheels and distribute them on PyPI, that could means a spike in usage on the Windows platform and could bring about some bugs or other issues we haven't seen before. It could also lead to breakage in the future as the code changes. Would you be willing to help fix things in the Windows wheels if/when they break? |
lanctot
left a comment
There was a problem hiding this comment.
Where is test_installation.py used?
It's a standalone script I used for local Windows testing. It’s not part of any workflow and will be removed in the next PR. |
Hi @lanctot, Thank you for the kind words! I'm glad I could help solve this long-standing feature request. I absolutely understand the concern about supporting Windows long-term. Yes, I'm willing to help maintain the Windows wheels. Here's what I can commit to: What I can do:
Response times:
What would help me help you:
Limitations:
I think it would also be wise to document in the installation guide that Windows support is "community-maintained" to set appropriate user expectations. I see this as a valuable opportunity to contribute to a project I use and learn from the codebase. I'm committed to keeping this working long-term. Does this level of commitment work for you? |
|
Great, and yes that works for us, thank you! Does this PR replace #1422? Quick question: have you tried using the resulting wheels via a pip install on Windows? Can we please add some documentation on how to do that (via a new section at the very top of You don't need to make a new PR each time you make changes btw, just commit + push to this branch. |
Yes, the Windows wheels were tested via pip install on Windows using the Python launcher. Once uploaded to PyPI, installation will be identical to macOS and Linux (pip install open-spiel), provided users use the standard python.org Python distribution.
The code in #1426 is the refined, up-to-date version implementing Windows pip/wheel support. |
|
Hi @visheshrwl, sorry to ask one more time but it'll be the last time, promise! We just removed support for Python 3.10 in #1424 (we had to do this today, there were a number of problems and CI tests were failing because of it), so we merged into master today. There are likely going to be conflicts with this PR as a result. Oh it looks like only one file.. maybe not so bad after all. Could you pull changes from master and either rebase or push a merge commit? (Also please remove any tests based on Python 3.10) Once done, as long as tests pass, I'll finally take a look and pull this in! Thanks for your patience. |
Hi @lanctot , No worries at all! I've just completed the udpates. Thanks for your patience as well! |
|
It appears you and @alexunderch are running into the same issue (he's working on #1408). I suspect the arm64 wheels are broken due to the scipy upgrade from a few days ago. Can you comment out the arm64 test in wheels.yml for now to see if it works? Also revert the yum commands |
Confirmed: https://github.com/google-deepmind/open_spiel/actions/runs/20957953304/job/60227228831 |
8e300db to
c8db4a7
Compare
|
Yes, we need to tackle ARM is a separate PR, because it's not as simple as it looks. Moreover, that ARM test doesn't actually run Ubuntu, it's either centos or fedora, so the wheels need to be addressed a bit differently. |
8e300db to
76ca30e
Compare
|
@visheshrwl thanks to the awesome work by @alexunderch the master branch is finally all fixed up and all the tests are now working. Feel free to merge into your branch or re-open a new PR with these changes. We still want them.. it's just been a rather chaotic few days re: stability. :) |
|
The original PR you had working as of two days ago should work with the state of master currently. Sorry for the unfortunate timing! |
|
@visheshrwl just checking to see if you plan to reopen or resubmit? |
|
@lanctot Thanks for reaching out and for the heads-up on the master branch! I definitely want to get this resubmitted. I’m currently in the middle of a massive 1,700km move for a new job, so I just need a few days to get my setup back online. I'll get an update to you shortly. |
|
Oh wow, I have done one of those.. totally hear you. Thanks for the update and no rush. Just wanted to be sure you get the credit for it. :) |
|
@visheshrwl hey after you finish, ping me thereafter current checkpointing protocols I implement, should trustrably work only with posix paths/fs, so maybe some adjustments or clarifications will be needed thank you in advance |
- Add setup.py with cross-platform CMake extension building - Add pyproject.toml for modern Python packaging (PEP 517) - Add GitHub Actions CI for automated Windows wheel building (py3.10-3.13) - Add WINDOWS_INSTALL.md guide and test_installation.py validator - Transform complex manual Windows setup to simple 'pip install open-spiel' - Fix dynamic wheel selection in test_wheel.sh for all Python versions - Update README.md with Windows installation documentation - Set python_requires>=3.10 to match upstream Enables native Windows pip installation, eliminating 20+ manual setup steps Resolves google-deepmind#804
- Use cmake --build with MSVC on Windows instead of make - Add Windows compiler flags (/std:c++17 /utf-8 /bigobj) - Skip C++ compiler check on Windows (CMake handles it) - Keep Unix build path unchanged (clang++/make)
Upstream skips Python 3.13 testing on macos-15 due to a known issue in rcfr_pytorch_test.py with NumPy strict type checking in Python 3.13. Reverting to upstream behavior to keep PR focused on Windows pip support.
Restore upstream behavior where macOS Python 3.13 runner skips full tests since only Python 3.14 wheel is built. This matches the upstream workaround for Python 3.13 compatibility issues.
Changed hardcoded manylinux_2_17_x86_64 pattern to wildcard manylinux* to support both x86_64 and aarch64 (ARM64) wheel architectures.
- Move pip installation instructions from WINDOWS_INSTALL.md to docs/windows.md as Option 1 - Remove WINDOWS_INSTALL.md (content now in docs/windows.md) - Remove Windows install link from README.md (already linked from docs/install.md) - Remove unnecessary root __init__.py (open_spiel/__init__.py already exists) Addresses feedback from code review.
- Update GitHub Actions to v6 (checkout@v6, setup-python@v6) - Add missing core dependencies to pyproject.toml (scipy, ml-collections) - Match version constraints from requirements.txt - Remove unused test_installation.py Addresses: @lanctot's review comments
- Add setup.py with cross-platform CMake extension building - Add pyproject.toml for modern Python packaging (PEP 517) - Add GitHub Actions CI for automated Windows wheel building (py3.10-3.13) - Add WINDOWS_INSTALL.md guide and test_installation.py validator - Transform complex manual Windows setup to simple 'pip install open-spiel' - Fix dynamic wheel selection in test_wheel.sh for all Python versions - Update README.md with Windows installation documentation - Set python_requires>=3.10 to match upstream Enables native Windows pip installation, eliminating 20+ manual setup steps Resolves google-deepmind#804
Upstream skips Python 3.13 testing on macos-15 due to a known issue in rcfr_pytorch_test.py with NumPy strict type checking in Python 3.13. Reverting to upstream behavior to keep PR focused on Windows pip support.
…clude scipy for ARM64
| @@ -0,0 +1,87 @@ | |||
| name: Build Wheels (Windows) | |||
There was a problem hiding this comment.
can we rename this file to build-wheels-windows.yml?
| # tests (tests that use extra dependencies such as PyTorch, JAX, Tensorflow) | ||
| # are tested in the Github Actions CI environment (Ubuntu 20.04 and Mac OS | ||
| # 10.15). | ||
| # Each wheel is built via the manylinux2014 pypa Docker image on Linux, |
There was a problem hiding this comment.
I think this has changed now to a more recent docker image, can we update this comment?
| CIBW_ENABLE: all | ||
| CIBW_ENVIRONMENT: "CXX=$(which g++) OPEN_SPIEL_BUILDING_WHEEL='ON' OPEN_SPIEL_BUILD_WITH_ACPC='ON' OPEN_SPIEL_BUILD_WITH_HANABI='ON' OPEN_SPIEL_BUILD_WITH_ROSHAMBO='ON'" | ||
| CIBW_BUILD: cp311-manylinux_aarch64 cp312-manylinux_aarch64 cp313-manylinux_aarch64 cp314-manylinux_aarch64 | ||
| # Temporarily disabled due to scipy compatibility issues |
There was a problem hiding this comment.
These have now been re-enabled.
Can you pull recent changes from master and commit a merge or rebase?
| @@ -0,0 +1,29 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
Can we move this file into python/tests?
| Please choose among the following options: | ||
|
|
||
| * [Installing OpenSpiel](docs/install.md) | ||
| * **[Windows Installation (pip install)](WINDOWS_INSTALL.md)** |
There was a problem hiding this comment.
Can we make this this a subsection of the already-existing windows.md ?
(Make it the top one, though.. leaving the build from source ones to further down.)
| dist/*.tar.gz | ||
| ./wheelhouse/*.whl | ||
|
|
||
| # Windows wheel builds - separate job due to different build process (no cibuildwheel) |
There was a problem hiding this comment.
Really? no cibuildwheel? I'm surprised, it said it supported Windows.
Fine with me, though, if this works..
| python -c "import pyspiel; game = pyspiel.load_game('tic_tac_toe'); print('OpenSpiel works! Game:', game.get_type().short_name)" | ||
| shell: pwsh | ||
|
|
||
| - name: Run basic tests |
There was a problem hiding this comment.
Maybe add a commet here that the windows tests are less thorough. Maybe we can improve this down the road.
| @@ -0,0 +1,104 @@ | |||
| # OpenSpiel Windows Installation Guide | |||
|
|
|||
There was a problem hiding this comment.
Can we add something here that indicates it's currently experimental and encourage users to open an issue if there are any problems? Thanks.

Tried to resolve #804 #804 #1369 #1422
feat: Add Windows pip installation support
Add setup.py with CMake extension building and dependency auto-cloning
Add pyproject.toml for modern Python packaging
Add GitHub Actions CI/CD for automated wheel building
Add WINDOWS_INSTALL.md guide and test_installation.py validator
Transform complex manual Windows setup to simple 'pip install open-spiel'
Fix CMake configuration for proper pyspiel.pyd placement
Update README.md with Windows installation documentation
Enables native Windows pip installation, eliminating 20+ manual setup steps