1

I am using Python to create a program for university, however, I included the PyMySQL library as a reference and have a .Ico file for the Icon of the program. Is there anything I can use to compile the multiple .py files and libraries with the Icon to a format that won't require the user to install PyMySQL first and that will package everything together.

For those interested; I have tried PyInstaller and another package compiler, yet not had any luck as some didn't let me compile multiple packages along with the library and Icon. Either that or I'm not doing it correctly?

PS. I'm quite new to python and I know Python compiled files are .pyc but I also know you can make them executables so they can't be editted etc. Thank you.

Ayden
  • 33
  • 1
  • 6
  • try `virtualenv` and see if that is what you want – Timothy Wong Jan 16 '18 at 09:56
  • This looks almost like a virtual machine for python. I plan on taking this program, and just being able to jump on a fresh install of windows, and open an executable file of my program that does not require the user to have Python or any referenced libraries installed. @Timothy Wong – Ayden Jan 16 '18 at 10:00
  • 1
    Pyinstaller should help you. Read the documentation and multiple examples aready posted on stackoverflow. For reference on your described problems, check https://pythonhosted.org/PyInstaller/spec-files.html , https://pythonhosted.org/PyInstaller/operating-mode.html#bundling-to-one-file and https://stackoverflow.com/questions/29291113/pyinstaller-setting-icon – BoboDarph Jan 16 '18 at 10:49
  • @Ayden then yes, do look into PyInstaller – Timothy Wong Jan 16 '18 at 13:21

0 Answers0