PyInstaller executable raises ImportError: no module named requests
<p>I'm having a problem creating a standalone executable using PyInstaller. Specifically, when I run pyinstaller -F module_name.py, it creates the executable, but the executable fails with ImportError: no module named requests. The module runs fine through the REPL. I know there's a few other questions out there with ImportErrors using PyInstaller; I've researched them and still can't get it working.</p>

<p>Here's my setup:</p>

<ul>
<li>Pycharm 2016.3 on Windows 7 64-bit</li>
<li>Python 2.7.12 32-bit in a virtual environment</li>
<li>PyInstaller 3.2</li>
</ul>

<p>This is a brand-new virtual environment, with the absolute minimum that I need to run this program. Requests and PyInstaller are both freshly installed from pip, and pip confirms that they're both up-to-date. </p>

<p>I've checked my PYTHONPATH, and the path to the virtual environment is in there and correct, and requests is in the virtual environment's site_packages directory. I've tried adding --hiddenimports=requests, no change. I hope I'm not missing something obvious, but I'm about out of ideas.</p>

<p>One thing I have noticed: the warncheck.txt file generated by PyInstaller shows a massive number of missing imports, many of them standard libraries (like re, and functools, and datetime). I don't know if this is a symptom of something else wrong.</p>

<p>Any help would be appreciated.</p>