简体   繁体   中英

Resolving Errno 13 Permission denied

I'm trying to use the stockfish chess engine to make board evaluations through python-chess but getting permission errors.

mac os, python 3.7, Ipython through Conda 4.9.2

Here is the result with just the last line of the traceback:

import chess.engine
engine = chess.engine.SimpleEngine.popen_uci("/Applications/Stockfish.app")
...
PermissionError: [Errno 13] Permission denied: '/Applications/Stockfish.app'

I have successfully used chmod to set permissions but am still getting the error.

Please help, quite stuck on this one.

First, Stockfish.app is the desktop app of stockfish on Mac, not the Stockfish engine. So you need to use the engine. You can find old engines here ( https://www.dropbox.com/sh/75gzfgu7qo94pvh/NlXX-QLGu6 ), but for the last engine, you need to install it using HomeBrew: brew install stockfish . See https://stockfishchess.org/download/ for more informations.

Second, in a terminal window, type chmod +x the_stockfish_engine_path to disable the permission restriction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM