A
A
AlexNest2021-01-06 21:45:50
Django
AlexNest, 2021-01-06 21:45:50

What is the correct way to use pyinstaller for django?

I run pyinstaller --name=site site/manage.py. The project is going.

From dist I run in cmd: site.exe runserver / site.exe runserver localhost:8000 :

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
  File "manage.py", line 18, in main
  File "django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "django\core\management\__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "django\core\management\base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 61, in execute
    super().execute(*args, **options)
  File "django\core\management\base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 96, in handle
    self.run(**options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 103, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "django\utils\autoreload.py", line 620, in run_with_reloader
    exit_code = restart_with_reloader()
  File "PyInstaller\hooks\rthooks\pyi_rth_django.py", line 72, in _restart_with_reloader
  File "django\utils\autoreload.py", line 246, in restart_with_reloader
    args = get_child_arguments()
  File "django\utils\autoreload.py", line 233, in get_child_arguments
    raise RuntimeError('Script %s does not exist.' % py_script)
RuntimeError: Script runserver does not exist.
[3168] Failed to execute script manage

C:\Users\Professional\PycharmProjects\dist\Distantinform>Distantinform.exe runserver localhost:8000
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
  File "manage.py", line 18, in main
  File "django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "django\core\management\__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "django\core\management\base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 61, in execute
    super().execute(*args, **options)
  File "django\core\management\base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 96, in handle
    self.run(**options)
  File "C:\Users\Professional\PycharmProjects\dist\Distantinform\django\core\management\commands\runserver.py", line 103, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "django\utils\autoreload.py", line 620, in run_with_reloader
    exit_code = restart_with_reloader()
  File "PyInstaller\hooks\rthooks\pyi_rth_django.py", line 72, in _restart_with_reloader
  File "django\utils\autoreload.py", line 246, in restart_with_reloader
    args = get_child_arguments()
  File "django\utils\autoreload.py", line 233, in get_child_arguments
    raise RuntimeError('Script %s does not exist.' % py_script)
RuntimeError: Script runserver does not exist.
[6184] Failed to execute script manage


Same from build
Error loading Python DLL 'C:\Users\Professional\PycharmProjects\build\Distantinform\python37.dll'.
LoadLibrary: ═х эрщфхэ єърчрээ√щ ьюфєы№.

What needs to be added to be able to run?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question