-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Windows pip support #1426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Windows pip support #1426
Conversation
- 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.
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
- 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
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. |

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