GithubHelp home page GithubHelp logo

Comments (12)

codethief avatar codethief commented on June 11, 2024

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

from sunfish.

sugizo avatar sugizo commented on June 11, 2024
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

from sunfish.

codethief avatar codethief commented on June 11, 2024

@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?

from sunfish.

thomasahle avatar thomasahle commented on June 11, 2024

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.

from sunfish.

yirod3721 avatar yirod3721 commented on June 11, 2024

so what do we do now

from sunfish.

codethief avatar codethief commented on June 11, 2024

@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?

from sunfish.

sugizo avatar sugizo commented on June 11, 2024
$ 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

from sunfish.

doctorvanmartin avatar doctorvanmartin commented on June 11, 2024

Same problem here.
I don't know how to fix it yet.

from sunfish.

doctorvanmartin avatar doctorvanmartin commented on June 11, 2024

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

from sunfish.

sugizo avatar sugizo commented on June 11, 2024

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

from sunfish.

codethief avatar codethief commented on June 11, 2024

@julupanter Which version of PyPy did you install exactly?

from sunfish.

doctorvanmartin avatar doctorvanmartin commented on June 11, 2024

@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

from sunfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.