1

enter image description hereIs there any way I can make an executable out of my Python project? There are many Python scripts that are in my Project and there are SQLite db files as well as other files and folders that are required for the software to run correctly. What is the best way of making this entire project executable?, Should I only make the Python scripts executable?enter image description here

I have tried Pyinstaller but I am not sure how to bundle all the files into 1 single executable. Shown above is a copy of all the files and folders in my directory.

GreenCoder90
  • 353
  • 3
  • 7
  • 21
  • Possible duplicate of [Trying to create 1 executable from Pycharm project](https://stackoverflow.com/questions/49454399/trying-to-create-1-executable-from-pycharm-project) – apogalacticon Apr 19 '18 at 22:28
  • correct. But my question is still not answered. I have not been able to achieve what I needed. – GreenCoder90 Apr 20 '18 at 10:34

1 Answers1

1

I think you need to modify the spec file, which PyInstaller creates on a first run. There is a special parameter for data files:

binaries: non-python modules needed by the scripts, including names given by the --add-binary option;

Try adding your database and other data files to this field and they should be included to you package. For further question I recommend to refer to official documentation and check examples on Github

grundic
  • 4,641
  • 3
  • 31
  • 47