when i try to use “django-admin runserver” on a project that worked about a month ago (i didnt edit anything btw) this happened (on VSCode)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>PS F:filenaemdjangler> django-admin runserver
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module>
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line
utility.execute()
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute
super().execute(*args, **options)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
^^^^^^^^^^^^^^
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__
self._setup(name)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
</code>
<code>PS F:filenaemdjangler> django-admin runserver Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module> File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line utility.execute() File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute super().execute(*args, **options) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle if not settings.DEBUG and not settings.ALLOWED_HOSTS: ^^^^^^^^^^^^^^ File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__ self._setup(name) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. </code>
PS F:filenaemdjangler> django-admin runserver     
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module>
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute
    super().execute(*args, **options)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle
    if not settings.DEBUG and not settings.ALLOWED_HOSTS:
           ^^^^^^^^^^^^^^
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__
    self._setup(name)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

tried to use the django-admin runserver command and expected it to work, because its a finished project that i made with the assistance of my old teacher, but for whatever reason when i try to run it now 2 months later and after moving it to another computer via an external disk it doesnt work, any help?

also “python manage.py runserver” doesnt work eighter, it just gives me this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>PS F:filenaemdjangler> python manage.py runserver
C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory
</code>
<code>PS F:filenaemdjangler> python manage.py runserver C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory </code>
PS F:filenaemdjangler> python manage.py runserver
C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory

New contributor

wawawawawawawa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

When ‘moving’ Django projects, take care because each project has its list of installed packages which is available on the requirements.txt. Those packages are usually contained in a virtual environment if one is used.

I’m guessing you haven’t activated your virtual environment. If you don’t have access to the virtual environment, you may want to create a new one and install the packages in your requirements.txt by running pip install -r requirements.txt. If you can use your virtual environment, you can activate it using yourvirtualenvironmentnameScriptsactivate.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

when i try to use “django-admin runserver” on a project that worked about a month ago (i didnt edit anything btw) this happened (on VSCode)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>PS F:filenaemdjangler> django-admin runserver
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module>
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line
utility.execute()
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute
super().execute(*args, **options)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
^^^^^^^^^^^^^^
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__
self._setup(name)
File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
</code>
<code>PS F:filenaemdjangler> django-admin runserver Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module> File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line utility.execute() File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute super().execute(*args, **options) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle if not settings.DEBUG and not settings.ALLOWED_HOSTS: ^^^^^^^^^^^^^^ File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__ self._setup(name) File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. </code>
PS F:filenaemdjangler> django-admin runserver     
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:UsersuserAppDataLocalProgramsPythonPython312Scriptsdjango-admin.exe__main__.py", line 7, in <module>
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagement__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 75, in execute
    super().execute(*args, **options)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementbase.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 82, in handle
    if not settings.DEBUG and not settings.ALLOWED_HOSTS:
           ^^^^^^^^^^^^^^
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 81, in __getattr__
    self._setup(name)
  File "C:UsersuserAppDataLocalProgramsPythonPython312Libsite-packagesdjangoconf__init__.py", line 61, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

tried to use the django-admin runserver command and expected it to work, because its a finished project that i made with the assistance of my old teacher, but for whatever reason when i try to run it now 2 months later and after moving it to another computer via an external disk it doesnt work, any help?

also “python manage.py runserver” doesnt work eighter, it just gives me this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>PS F:filenaemdjangler> python manage.py runserver
C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory
</code>
<code>PS F:filenaemdjangler> python manage.py runserver C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory </code>
PS F:filenaemdjangler> python manage.py runserver
C:UsersuserAppDataLocalProgramsPythonPython312python.exe: can't open file 'F:\filenaem\djangler\manage.py': [Errno 2] No such file or directory

New contributor

wawawawawawawa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

When ‘moving’ Django projects, take care because each project has its list of installed packages which is available on the requirements.txt. Those packages are usually contained in a virtual environment if one is used.

I’m guessing you haven’t activated your virtual environment. If you don’t have access to the virtual environment, you may want to create a new one and install the packages in your requirements.txt by running pip install -r requirements.txt. If you can use your virtual environment, you can activate it using yourvirtualenvironmentnameScriptsactivate.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật