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
Support for Python3? #203
Comments
I'm not 100% I can help with this, but could you please give the full error message you're getting when trying to install? |
This is correct - Python 3 is not supported at present (but we would always welcome patches to add such support!) |
How to install the gambit to the python site-packages folder.When I use python setup.py install, encountering some errors. (Python2.7 on win10)E:\gambit-15.1.0\src\python>python setup.py install |
Microsoft C++ is not a supported compiler. In fact building on Windows probably doesn't work, at least not without some doing. Also, please do open a separate issue with a new question rather than hijacking an unrelated one - it helps keep people from getting confused. |
I have been fiddling with making the code compatible with Python3. It requires 4 types of modifications (see e.g. http://python-future.org/compatible_idioms.html):
All in all only the following files need to be modified:
With these modifications, the same source builds using both python2.7 and python3.5 on Ubuntu 16.04. I hesitate to do a pull request as I still have some installation issues:
My understanding of the Python lookup mechanism is insufficient to resolve this. However, if someone would be willing to investigate it, I can do the pull request for the source modifications for Python3. |
Many thanks for your interest in this very useful issue to be dealing with. I would be available to help support a contribution on this. It would be useful to think first about the most practical way to organise it. My own preference, based on the 2-to-3 conversions I have been doing with other code of mine, is to use futurize, and also possibly to work on changing one type of change per commit. This should make it somewhat easier to debug - as probably it would be a very good idea to add a few additional tests to exercise the parts of the code where changes are required. |
Yeah, Can’t promise a quick timeframe as this is purely a side project. I was trying to implement counter factual regret (CFR) minimization algorithms, and at first "only" wanted to use Gambit as a check on the equilibrium being computed. Then I realized the whole extensive form infrastructure was too nice not to use for CFR as well. :) |
I'll be happy to have contributions as and when. I am fully booked the next few months but realistically I may be able to allocate some time in July and August to deal with the various pending packaging and Python 2/3 issues that are outstanding. |
Commit b0f989d introduces Python3 support. Python 2.7 continues to be supported as well. |
I downloaded gambit-15.1 from github, and installed to my python site-packages folder.
However, it seems that I can ONLY install gambit with Python2.7, but Python3.5/Python3.6 will throw error that saying "dict is not writable".
The text was updated successfully, but these errors were encountered: