user23938: I'm trying to get stockfish for python working but I am running into issues. This is my code so far.
from stockfish import Stockfish
stockfish = Stockfish('/Users/Me/opt/anaconda3/lib/python3.9/site-packages/stockfish/models.py')

This returns a OSError: [Errno 8] Exec format error: '/Users/Me/opt/anaconda3/lib/python3.9/site-packages/stockfish/models.py'
This is where I downloaded the package from: https://pypi.org/project/stockfish/. After this, as I have a Mac, I downloaded it through homebrew and my installation has a path /opt/homebrew/Cellar/stockfish/15, but this also does not work.

user28283: I think the path that you give to the Stockfish constructor is wrong.
According to this page https://pypi.org/project/stockfish/ you should rather give the path to where you installed your engine, so probably /opt/homebrew/Cellar/stockfish/15 , not some python file in the stockfish package.

user30545: Download an appropriate stockfish binary at https://stockfishchess.org/download/.
Remember where it is and use that location and engine filename.
stockfish = Stockfish('/engine_path/engine_filename')


23938: <p>I'm trying to get stockfish for python working but I am running into issues. This is my code so far.</p>
<pre><code>from stockfish import Stockfish
stockfish = Stockfish('/Users/Me/opt/anaconda3/lib/python3.9/site-packages/stockfish/models.py')
</code></pre>
<p>This returns a <code>OSError: [Errno 8] Exec format error: '/Users/Me/opt/anaconda3/lib/python3.9/site-packages/stockfish/models.py'</code></p>
<p>This is where I downloaded the package from: <a href="https://pypi.org/project/stockfish/" rel="nofollow noreferrer">https://pypi.org/project/stockfish/</a>. After this, as I have a Mac, I downloaded it through homebrew and my installation has a path <code>/opt/homebrew/Cellar/stockfish/15</code>, but this also does not work.</p>
 28283: <p>I think the path that you give to the Stockfish constructor is wrong.</p>
<p>According to this page <a href="https://pypi.org/project/stockfish/" rel="nofollow noreferrer">https://pypi.org/project/stockfish/</a> you should rather give the path to where you installed your engine, so probably <code>/opt/homebrew/Cellar/stockfish/15</code> , not some python file in the stockfish package.</p>
 30545: <p>Download an appropriate stockfish binary at <a href="https://stockfishchess.org/download/" rel="noreferrer">https://stockfishchess.org/download/</a>.</p>
<p>Remember where it is and use that location and engine filename.</p>
<pre><code>stockfish = Stockfish('/engine_path/engine_filename')
</code></pre>
