2👍
this post talks all about using py2exe to get a single exe file.
py2exe – generate single executable file
If you post some code i’ll take a look, and your error message will help to.
1👍
Maybe you can try pyinstaller instead.
I did have this problem before and didn’t find a solution ever, but pyinstaller meets my need too and works perfectly.
- DjangoRestFramework HTTPS Links With Routers and Viewsets
- Make a Django model read-only?
- Django 3.1: StreamingHttpResponse with an async generator
- Django 1.8 Migrations. Adding DateTimeField after db creation. Best practices?
1👍
I also faced similar problem. But mine is with PyGTK. Simple program has no problem with it. Although there is no straight solution, there is an explanation provided here.
It says:
This is based on the Inno sample code in the py2exe distribution. It has worked successfully for a rather complicated PyGTK/Twisted app requiring extra data at runtime (GTK runtime data, GtkBuilder files, images, text data) that just wouldn’t work with bundle_files.
- How to activate the process queue in "django-background-tasks"
- Tiny MCE popups blank in Django admin
- Django: "order" a queryset based on a boolean field
- In a schemamigration, what should be the default value for a null=False field which I'm sure that won't have null values?
0👍
Here’s The solution:
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 3}},
windows = [{'script': "Your_App_Name.py"}],
zipfile = None,
)
- Admin inline with no ForeignKey relation
- How to include excluded rows in RETURNING from INSERT … ON CONFLICT
- How to Model a Foreign Key in a Reusable Django App?
- Using django with postman {"detail":"CSRF Failed: CSRF token missing or incorrect."}