manage.py runserver error

392 views
Skip to first unread message

Pawan Jha

unread,
Sep 22, 2019, 12:10:42 AM9/22/19
to Django users
When I run the Command "manage.py runserver" on the command prompt(WINDOWS), I get the following error:
Traceback (most recent call last):
  File "C:\Documents and Settings\harsh\Desktop\Django\mysite\manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 56, in __getattr__
    self._setup(name)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: Import by filename is not supported.

Please Help Me!!!


The same happens when i try to run "python -m django --version":
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\lib\site-packages\django\__main__.py", line 9, in <module>
    management.execute_from_command_line()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 56, in __getattr__
    self._setup(name)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: Import by filename is not supported.

Please help Me!!!

Ayser shuhaib

unread,
Sep 22, 2019, 1:10:02 AM9/22/19
to django...@googlegroups.com
I think the problem is incompatibility between django version and python version.

Install python 3.7 with the latest version of Django 
Then try.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1db889b0-e7d7-4c50-a019-3dc660372061%40googlegroups.com.

Abu Yusuf

unread,
Sep 22, 2019, 5:04:59 AM9/22/19
to django...@googlegroups.com
It's a shame to use python2 still now. Try to start your django project with virtualenvironment with python-3 version.
Try to follow the standard way to get start. Everything will be fine.

--

oba stephen

unread,
Sep 22, 2019, 6:09:44 AM9/22/19
to django...@googlegroups.com
Did you use "python manage.py runserver" or just "manage.py runserver"?

--

Ashok Rai

unread,
Sep 22, 2019, 6:09:49 AM9/22/19
to django...@googlegroups.com
You better try using python 3

--

Badal Raina

unread,
Sep 22, 2019, 1:53:45 PM9/22/19
to django...@googlegroups.com
First, work on python environment and then continue your job


Badal Raina


Sanjeev Shukla

unread,
Sep 22, 2019, 10:49:36 PM9/22/19
to Django users
to check version of django use - >django-admin --version

Reply all
Reply to author
Forward
0 new messages