Answers.Body: <p>In the error log you've pasted you can see it's a permission error, which can occur for files that behave as "executables" if you will (think any form of program, e.g. scripts, compiled files etc), but that have not been given the rights by the os to do so. One way to fix it, go to the folder containing the engine file and open a terminal to run the following command which will render your file as executable to the os:</p>
  
  <p><code>chmod +x stockfish_10_x64</code></p>
  
  <p>Alternatively, right click, go to properties, permissions and select "allow executing file as program".
  After this (by either method) you should be able to load and run the engine within the python-chess library.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T14:35:46.783Z
Answers.LastActivityDate: 2019-01-10T14:35:46.783Z
Answers.UserDisplayName: Ellie
Body: <p>I'm using python chess and I'm trying to use my stockfish 10 engine downloaded from the stockfish website.</p>
  
  <pre><code>import chess.uci
  
  engine = chess.uci.popen_engine(r"stockfish-10-linux/Linux/stockfish_10_x64")
  </code></pre>
  
  <p>Leads to the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/uci.py", line 1139, in popen_engine
      return _popen_engine(command, engine_cls, setpgrp, **kwargs)
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/_engine.py", line 295, in _popen_engine
      PopenProcess(engine, command, **popen_args)
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/_engine.py", line 133, in __init__
      self.process = subprocess.Popen(command, **popen_args)
    File "/home/tim/anaconda3/lib/python3.7/subprocess.py", line 756, in __init__
      restore_signals, start_new_session)
    File "/home/tim/anaconda3/lib/python3.7/subprocess.py", line 1499, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  PermissionError: [Errno 13] Permission denied: 'stockfish-10-linux/Linux/stockfish_10_x64'
  </code></pre>
  
  <p>I've done this before on my old computer and I'm mimicking my old code which ran with no problem. Except in my old code I used stockfish 9 and here I'm using stockfish 10. Also I imported chess.engine in my old code but now it says this library isn't available.</p>
  
Tags: <engines><software><python>
Title: Why can't I use my stockfish engine with python chess?
ThreadText: # Why can't I use my stockfish engine with python chess?
  
  (Asked by: username_0 on 2019-01-10)
  
  I'm using python chess and I'm trying to use my stockfish 10 engine downloaded from the stockfish website.
  import chess.uci
  
  engine = chess.uci.popen_engine(r"stockfish-10-linux/Linux/stockfish_10_x64")
  
  Leads to the error:
  Traceback (most recent call last):
    File "", line 1, in 
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/uci.py", line 1139, in popen_engine
      return _popen_engine(command, engine_cls, setpgrp, **kwargs)
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/_engine.py", line 295, in _popen_engine
      PopenProcess(engine, command, **popen_args)
    File "/home/tim/anaconda3/lib/python3.7/site-packages/chess/_engine.py", line 133, in __init__
      self.process = subprocess.Popen(command, **popen_args)
    File "/home/tim/anaconda3/lib/python3.7/subprocess.py", line 756, in __init__
      restore_signals, start_new_session)
    File "/home/tim/anaconda3/lib/python3.7/subprocess.py", line 1499, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  PermissionError: [Errno 13] Permission denied: 'stockfish-10-linux/Linux/stockfish_10_x64'
  
  I've done this before on my old computer and I'm mimicking my old code which ran with no problem. Except in my old code I used stockfish 9 and here I'm using stockfish 10. Also I imported chess.engine in my old code but now it says this library isn't available.
  
  **Tags:** engines, software, python
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-10. Score: 4
  
  In the error log you've pasted you can see it's a permission error, which can occur for files that behave as "executables" if you will (think any form of program, e.g. scripts, compiled files etc), but that have not been given the rights by the os to do so. One way to fix it, go to the folder containing the engine file and open a terminal to run the following command which will render your file as executable to the os:
  
  `chmod +x stockfish_10_x64`
  
  Alternatively, right click, go to properties, permissions and select "allow executing file as program".
  After this (by either method) you should be able to load and run the engine within the python-chess library.
  
  
  ---
  
  