Hi there, I've been struggling to get rid of these hidden imports issues 
arising from django. Please could you tell me what am I doing wrong? -I 
have --hidden-import switches -I have tweaked the venv/lib/python3.11/site-
packages/PyInstaller/hooks/hook-django.py Line 49 to contain the same list 
of mentioned hidden imports 
Here is exactly what I did with a hello world django sample.
Thank you in advance for any assistance you may provide [image: 🙂] Cheers, 
David Marceau
David Marceau


source ~/blah/venv/bin/activate
cd /home/paladin/helloworldtests
PYTHONPATH="/home/paladin/blah/common/libraries/python3" 
/home/paladin/blah/venv/bin/python3.11 -m django startproject hellodjango

cd ~/helloworldtests/hellodjango
PYTHONPATH="/home/paladin/blah/common/libraries/python3" 
/home/paladin/blah/venv/bin/python3.11 manage.py runserver

/home/paladin/blah/venv/bin/python3.11 -m PyInstaller \
     --clean \
     --debug all \
     --paths /home/paladin/blah/common/libraries/python3 \
     --paths /home/paladin/blah/venv/lib/python3.11/site-packages \
     --hidden-import jinja2.ext \
     --hidden-import django.db.backends.__pycache__.base \
     --hidden-import django.db.backends.oracle.compiler \
     --hidden-import sqlite3.dump \
     --hidden-import django.contrib.staticfiles.templatetags \
     --hidden-import rest_auth.templatetags \
     --hidden-import django.contrib.contenttypes.templatetags \
     --hidden-import django.contrib.staticfiles.context_processors \
     --hidden-import rest_auth.context_processors \
     --hidden-import django.contrib.sessions.templatetags \
     --hidden-import django.contrib.sessions.context_processors \
     --hidden-import tempus_dominus.templatetags \
     --hidden-import tempus_dominus.context_processors \
     --hidden-import dynatrol.templatetags \
     --hidden-import django.contrib.messages.templatetags \
     --hidden-import rest_framework.context_processors \
     --hidden-import rest_framework.authtoken.templatetags \
     --hidden-import multiselectfield.templatetags \
     --hidden-import multiselectfield.context_processors \
     --hidden-import django_json_widget.templatetags \
     --hidden-import django.contrib.admin.context_processors \
     --hidden-import dynatrol.context_processors \
     --hidden-import django.db.backends.postgresql_psycopg2 \
     --hidden-import django.contrib.auth.templatetags \
     --hidden-import rest_framework.authtoken.context_processors \
     --hidden-import django.contrib.contenttypes.context_processors \
     --hidden-import django_json_widget.context_processors \
     --hidden-import http.cookies \
     --hidden-import html.parser \
     --hidden-import mx.DateTime \
     --onefile \
     --name pti-pi-hellodjango manage.py

15052 INFO: Analyzing hidden import 'jinja2.ext'
15052 ERROR: Hidden import 'jinja2.ext' not found
15052 INFO: Analyzing hidden import 'django.db.backends.__pycache__.base'
15052 ERROR: Hidden import 'django.db.backends.__pycache__.base' not found 
15052 INFO: Analyzing hidden import 'django.db.backends.oracle.compiler' 
15052 ERROR: Hidden import 'django.db.backends.oracle.compiler' not found 
15052 INFO: Analyzing hidden import 'sqlite3.dump' 
15052 INFO: Loading module hook 'hook-sqlite3.py' from 
'/home/paladin/.dynatrol/venv/lib/python3.11/site-packages/PyInstaller/hooks'...
 

15147 INFO: Analyzing hidden import 'django.contrib.staticfiles.templatetags' 

15147 ERROR: Hidden import 'django.contrib.staticfiles.templatetags' not 
found 
15148 INFO: Analyzing hidden import 'rest_auth.templatetags' 
15148 ERROR: Hidden import 'rest_auth.templatetags' not found 
15148 INFO: Analyzing hidden import 'django.contrib.contenttypes.templatetags' 

15148 ERROR: Hidden import 'django.contrib.contenttypes.templatetags' not 
found 
15148 INFO: Analyzing hidden import 
'django.contrib.staticfiles.context_processors' 

15148 ERROR: Hidden import 'django.contrib.staticfiles.context_processors' 
not found 
15148 INFO: Analyzing hidden import 'rest_auth.context_processors' 
15148 ERROR: Hidden import 'rest_auth.context_processors' not found 
15148 INFO: Analyzing hidden import 'django.contrib.sessions.templatetags' 
15148 ERROR: Hidden import 'django.contrib.sessions.templatetags' not found 
15148 INFO: Analyzing hidden import 
'django.contrib.sessions.context_processors' 

15148 ERROR: Hidden import 'django.contrib.sessions.context_processors' not 
found 
15148 INFO: Analyzing hidden import 'tempus_dominus.templatetags' 
15148 ERROR: Hidden import 'tempus_dominus.templatetags' not found 
15148 INFO: Analyzing hidden import 'tempus_dominus.context_processors' 
15148 ERROR: Hidden import 'tempus_dominus.context_processors' not found 
15148 INFO: Analyzing hidden import 'dynatrol.templatetags' 
15149 ERROR: Hidden import 'dynatrol.templatetags' not found 
15149 INFO: Analyzing hidden import 'django.contrib.messages.templatetags' 
15151 ERROR: Hidden import 'django.contrib.messages.templatetags' not found 
15151 INFO: Analyzing hidden import 'rest_framework.context_processors' 
15151 ERROR: Hidden import 'rest_framework.context_processors' not found 
15151 INFO: Analyzing hidden import 'rest_framework.authtoken.templatetags' 
15151 ERROR: Hidden import 'rest_framework.authtoken.templatetags' not 
found 
15151 INFO: Analyzing hidden import 'multiselectfield.templatetags' 
15157 ERROR: Hidden import 'multiselectfield.templatetags' not found 
15157 INFO: Analyzing hidden import 'multiselectfield.context_processors' 
15157 ERROR: Hidden import 'multiselectfield.context_processors' not found 
15157 INFO: Analyzing hidden import 'django_json_widget.templatetags' 
15158 ERROR: Hidden import 'django_json_widget.templatetags' not found 
15158 INFO: Analyzing hidden import 'django.contrib.admin.context_
processors' 
15376 ERROR: Hidden import 'django.contrib.admin.context_processors' not 
found 
15376 INFO: Analyzing hidden import 'dynatrol.context_processors' 
15376 ERROR: Hidden import 'dynatrol.context_processors' not found 
15376 INFO: Analyzing hidden import 'django.db.backends.
postgresql_psycopg2' 
15376 ERROR: Hidden import 'django.db.backends.postgresql_psycopg2' not 
found 
15376 INFO: Analyzing hidden import 'django.contrib.auth.templatetags' 
15376 ERROR: Hidden import 'django.contrib.auth.templatetags' not found 
15376 INFO: Analyzing hidden import 'rest_framework.authtoken.
context_processors' 
15376 ERROR: Hidden import 'rest_framework.authtoken.context_processors' 
not found 
15376 INFO: Analyzing hidden import 'django.contrib.contenttypes.
context_processors' 
15376 ERROR: Hidden import 'django.contrib.contenttypes.context_processors' 
not found 
15376 INFO: Analyzing hidden import 'django_json_widget.context_processors' 
15376 ERROR: Hidden import 'django_json_widget.context_processors' not 
found 
15376 INFO: Analyzing hidden import 'mx.DateTime' 
15376 ERROR: Hidden import 'mx.DateTime' not found 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4060a9e1-b57c-4924-bec4-97682e8c738en%40googlegroups.com.

Reply via email to