I'm using Repl.it and Python to communicate with an executable (stockfish
, a chess engine).
i.e.:
- Send a command to the stockfish executable
- Get the output
This is what I'm currently doing:
stockfish = subprocess.check_output(f'printf "position fen {board.fen()}\ngo depth 7\nucinewgame\n" | ./stockfish'
, shell=True, text=True, timeout=5)
# then do something with stockfish
Weirdly, this does not work even though I have ensured that the executable works correctly. In fact, it works properly when I execute it in the shell. However, when I execute it from the Python script, it instead gives me this error:
./stockfish: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/dd8swlwhpdhn6bv219562vyxhi8278hs-gcc-10.3.0-lib/lib/libstdc++.so.6)
Is there any way to solve this error? I have tried many alternatives, including using subprocess.run()
, etc. I know that the error reports something about GLIBC being outdated, but there is nothing I can do to fix GLIBC right now, and I believe it is not necessary for the executable to be run. I am merely looking for a bypass. Thanks in advance!