I know this isn't a programming forum, though it's chess-related, hence the placement on here. Basically, I'm trying to setup stockfish with Python on my PC. I installed it via pip install stockfish
.
So I went on and tried to setup the Stockfish via:
from stockfish import Stockfish
stockfish = Stockfish(r'C:\Users\Acer\Desktop\chess\stockfish-11-win')
That throws a WinError 5, access denied:
Exception ignored in: <function Stockfish.__del__ at 0x0429AA48>
Traceback (most recent call last):
File "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\site-packages\stockfish\models.py", line 270, in __del__
self.stockfish.kill()
AttributeError: 'Stockfish' object has no attribute 'stockfish'
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
emily = Stockfish(r'C:\Users\Acer\Desktop\chess\stockfish-11-win\src')
File "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\site-packages\stockfish\models.py", line 33, in __init__
self.stockfish = subprocess.Popen(
File "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Zugriff verweigert
I tried different Stockfish Downloads, running the Idle or CMD as admin, re-installed and used different PCs, but I somehow don't get to work with Stockfish - anyone able to help me out bypassing the access denied? What do I miss when initializing?
r'C:\Users\Acer\Desktop\chess\stockfish-11-win'
is the path to the binary.pip install stockfish
just allows you to easily call the engine from your Python code.