title: Pyinstaller giving ModuleNotFoundError when importing sqlalchemy
body: <p>I'm converting a python script into an executable file with pyinstaller. I create the .exe file successfully, but when I run it (in windows), cmd returns the error:
  ModuleNotFoundError: No module named 'sqlalchemy'
  [16964] Failed to execute script scriptname</p>
  <p>Sqlalchemy is the last module imported in the script (cx_Oracle, pandas, other internal modules import successfully). Sqlalchemy is stored in the same directories as my other modules.</p>
  <p>Other sources suggested importing sqlalchemy.sql.default_comparator or trying to put sqlalchemy module in as a hidden import argument. I tried adding both sqlalchemy and sqlalchemy.sql.default_comparator as hidden import arguments on different attempts but neither fixed the issue.</p>
  <p>i.e. pyinstaller --onefile scriptname.py --hiddenimports=sqlalchemy</p>
  <p>I also read the xref-scriptname html document in the build folder that pyinstaller creates to try to figure out why sqlalchemy wasn't importing but couldn't figure it out.</p>
  <p>Any suggestions on how to get this executable to import sqlalchemy would be greatly appreciated</p>
  <p>EDIT: ANSWER
  I figured out a work around if anyone has this issue in the future: I built the executable program without the --onefile argument.      ie: pyinstaller scriptname.py.    This built an executable .exe file within a folder with everything necessary to run the file, instead of having everything compiled into 1 file. I then copied and pasted my sqlalchemy module folder from site_packages into my pyinstaller dist folder. This worked - the .exe program finds sqlalchemy locally when a user runs this program now</p>