To convert a django project with multiple apps and pys using pyinstaller

989 views
Skip to first unread message

Azeez Adeniyi

unread,
Aug 25, 2022, 2:18:59 AM8/25/22
to PyInstaller
Been battling hard with how to use pyinstaller to convert my django project to one executable that runs without the console. My project consists of apps with the usual views.py, admin.py etc. I wonder how to bundle all these pys into one executable app so that users can just install the application and use without installing any dependencies

Thanks in advance

Chris Barker

unread,
Aug 26, 2022, 4:49:43 AM8/26/22
to pyins...@googlegroups.com
On Wed, Aug 24, 2022 at 11:19 PM Azeez Adeniyi <macro...@gmail.com> wrote:
Been battling hard with how to use pyinstaller to convert my django project to one executable that runs without the console. My project consists of apps

Do you have more than one app? that might be a bit tricky -- or might not -- I think a Django app is essentially a Python package -- so you should be able to bundle it up with PyInstaller just like any other app.

But Django needs a web server to run behind:


I suggest that you use one of the Python servers, such as gunicorn:


The you'll need a python start up script that fires up gnuicorn. That start up script will be the "Application" as far as PyInstaller is concerned. 

Then you'll "just" need to make sure PYInstaller bundles up all the code and data you need to run your app.

-CHB


 
with the usual views.py, admin.py etc. I wonder how to bundle all these pys into one executable app so that users can just install the application and use without installing any dependencies

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/f8d5a20e-5478-4235-bc6a-13bb3642e33an%40googlegroups.com.


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov
Reply all
Reply to author
Forward
0 new messages