How do I include .dll file in executable using pyinstaller? : <p>I want to generate a single executable file from my python script.
For this I use pyinstaller. I had issues with mkl libraries because I use numpy in the script.</p>

<p>I used this <a href="https://github.com/pyinstaller/pyinstaller/issues/1881" rel="noreferrer" title="hook">hook</a> so solve the issue, it worked fine. But it does not work if I copy the single executable file to another directory and execute it. I guess I have to copy the hook also. But I just want to have one single file that I can use at other computers without copying <code>.dll's</code> or the hook.</p>

<p>I also changed the <code>.spec</code> file as described <a href="https://pythonhosted.org/PyInstaller/spec-files.html" rel="noreferrer">here</a> and added the necessary files to the <code>binaries</code>-variable. That also works as long as the <code>.dll's</code> are in the provided directory for the <code>binaries</code>-variable , but that won't work when I use the executable on a computer that doesn't have these <code>.dll's</code>.</p>

<p>I tried using the <code>--hidden-import= FILENAME</code> option. This also solves the issue, but just when the <code>.dll's</code> are provided somewhere.</p>

<p>What I'm looking for is a possibility to bundle the <code>.dll's</code> into the single executable file so that I have one file that works independently.</p>
