Open sugizo opened 1 year ago
I'm seeing the same issue using Python 3.10.6 on Ubuntu 22.04.1.
I also tried pypy3.6-7.1.0 (listed at the bottom of the README) and got a type error when executing sunfish.py
directly:
$ ./sunfish.py
Traceback (most recent call last):
File "./sunfish.py", line 261, in <module>
Entry = namedtuple("Entry", "lower upper", defaults=(-MATE_UPPER, MATE_UPPER))
TypeError: namedtuple() got an unexpected keyword argument 'defaults'
I think some clarification regarding which Python versions are supported is very much needed, especially since ./sunfish.py
has a hashbang referring to PyPy3, while ./tools/fancy.py
uses /usr/bin/env python3
…
git clone https://github.com/thomasahle/sunfish
cd sunfish
python ./sunfish.py
result no error occured, just loading on terminal
expected result like on github readme
$ python ./sunfish.py
Playing against sunfish 2023.
Do you want to be white or black? black
1 ♖ ♘ ♗ ♔ ♕ ♗ ♘ ♖
2 ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
3
4
5
6
7 ♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
8 ♜ ♞ ♝ ♚ ♛ ♝ ♞ ♜
h g f e d c b a
Score: 23, nodes: 11752, nps: 13812, time: 0.9
My move: d4
1 ♖ ♘ ♗ ♔ ♕ ♗ ♘ ♖
2 ♙ ♙ ♙ ♙ ♙ ♙ ♙
3
4 ♙
5
6
7 ♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
8 ♜ ♞ ♝ ♚ ♛ ♝ ♞ ♜
h g f e d c b a
Your move (e.g. c6 or g8h6): Nf6
@sugizo
result no error occured, just loading on terminal
What do you mean by "just loading"? Also, which Python version (on which OS) are you using?
Unfortunately sunfish.py
can't use env
, since it needs the -u
argument added to python.
Regrading default values for namedtuple, I believe that requires Python 3.7.
so what do we do now
@thomasahle Like @yirod3721 I'm not entirely sure what to make of your comment, given that I also tried to run Sunfish
using Python 3.10.6 on Ubuntu 22.04.1.
Maybe you could specify the Python versions Sunfish runs with fine, using e.g. a .tool-versions file? Alternatively, a devbox.json or, maybe even better, a Dockerfile?
$ uname -a
Darwin sugizo.local 16.7.0 Darwin Kernel Version 16.7.0: Sun Jun 2 20:26:31 PDT 2019; root:xnu-3789.73.50~1/RELEASE_X86_64 x86_64
$ python -V
Python 3.9.13
just loading means no error occured, but no respond either,
loading is the loading animated on top of terminal is rounding
Same problem here. I don't know how to fix it yet.
Same problem here. I don't know how to fix it yet.
Solved.
sudo apt install pypy3
run as:
./tools/fancy.py -cmd ./sunfish.py
not work too when tested on google colab steps
!apt install -y pypy3
!git clone https://github.com/thomasahle/sunfish
execute
!cd sunfish && python ./sunfish.py
result same like tested on mac just loading means no error occured, but no respond either,
loading is the loading animated on top of terminal is rounding
execute
!cd sunfish/tools/fancy.py -cmd ../sunfish.py
result /bin/bash: line 0: cd: too many arguments
@julupanter Which version of PyPy did you install exactly?
@julupanter What version of PyPy did you install exactly?
The task was performed on a virtual machine that is no longer accessible, but at the time, it was the latest available. The virtual machine was running Ubuntu 22.10. I hope this information helps