0

I am a total noob when it comes to this, but I have been tasked to package several Python files into one .exe file.

I tried doing this with PyInstaller and I realized that I wasn't able to import opencv at first. Sure enough, I pasted a copy of cv2.pyd into the site packages folder and that was corrected. I tried building it again but it still doesn't work.

The command I use is: pyinstaller --onedir C:\Users\ -- Directory of Python file The file I'm using is the main one, that makes the program run. I thought PyInstaller would have scanned this file and find the other imported files.

I'm not sure how to add the other files. The documentation on the PyInstaller website isn't super clear to me.

More Info: Application consists of a GUI with 5 Python files in total Application packages but doesn't run (Command Window blips and goes away)

Any suggestions? Thanks a million - Matt

mbhdtech
  • 1
  • 1
  • This link should be helpful for both Python 2 and Python 3: https://stackoverflow.com/questions/7950335/how-would-i-combine-multiple-py-files-into-one-exe-with-py2exe – C. Lightfoot Jul 18 '17 at 14:08
  • Thank you for the link. I managed to figure it out. Turns out that I needed to install PyInstaller in my Anaconda folder and not the regular python folder. After that, Everything else checked out fine. – mbhdtech Jul 18 '17 at 18:29
  • Possible duplicate of [How would I combine multiple .py files into one .exe with Py2Exe](https://stackoverflow.com/questions/7950335/how-would-i-combine-multiple-py-files-into-one-exe-with-py2exe) – tripleee Feb 01 '19 at 05:47

0 Answers0