System: Windows 7 64-Bit, Python 3.5, Anakonda 3 (64 Bit), django 1.10.1pyinstaller 3.2 mit django 1.10.1
Ich versuche, mein django Projekt auf 2 Arten zu kompilieren:
Erstens:
[Anaconda3] c:\compilation\Gui>pyinstaller --name=gui --exclude-module=PyQt4 --exclude-module=matplotlib --clean --win-private-assemblies manage.py
Zweite nach this soloution:
[Anaconda3] c:\compilation\Gui>pyinstaller --name=gui --exclude-module=PyQt4 --exclude-module=matplotlib --clean --win-private-assemblies --runtime-hook=pyi_rth_django.py manage.py
Wenn ich versuche, die Ausgabe auszuführen:
c:\compilation\Gui\dist\gui>gui.exe runserver
ich (für die 2 Versionen ich die gleiche Ausgabe erhalten):
c:\compilation\Gui\dist\gui>gui.exe runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000000044E9D90>
Traceback (most recent call last):
File "site-packages\django\utils\autoreload.py", line 226, in wrapper
File "site-packages\django\core\management\commands\runserver.py", line 113, in inner_run
File "site-packages\django\utils\autoreload.py", line 249, in raise_last_exception
File "site-packages\django\utils\six.py", line 685, in reraise
File "site-packages\django\utils\autoreload.py", line 226, in wrapper
File "site-packages\django\__init__.py", line 27, in setup
File "site-packages\django\apps\registry.py", line 85, in populate
File "site-packages\django\apps\config.py", line 116, in create
File "importlib\__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django.contrib.admin.apps'
Bitte Beratung.
hinzufügen 'runserver' bis Ende des' pyinstaller' Befehl, so dass es zusätzliche Abhängigkeit erkennen könnte? –
Können Sie uns das bitte demonstrieren? [Mein Versuch ist mit Fehlern gescheitert, der --runtime-hook = pyi_rth_django.py scheint den runserver cmd abzudecken]. – user2495766
'pyinstaller --name = gui --ausschlussmodul = PyQt4 --exclude-module = matplotlib --clean --win-private-assemblies manage.py runserver'? –