A
A
Archer *range attack +10*2016-05-18 08:50:52
Django
Archer *range attack +10*, 2016-05-18 08:50:52

Why does Django swear when trying to start a local server?

I follow the instructions from the Hello Web App book.
I created a project, I start the server python manage.py runserver, it gives an error ImportError: No module named core.management.
Fixed by replacing the first line in my project's manage.py with

#!/Users/тут_имя_учетной_записи/Django/myhellowebapp/venv/bin/python
and re-activated venv. Did not help.
I tried changing the path to
#!/Users/тут_имя_учетной_записи/Library/Python/2.7/python
, the same. Here is what he writes:
Unhandled exception in thread started by <function wrapper at 0x10298aed8>
Traceback (most recent call last):
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper
    fn(*args, **kwargs)
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 107, in inner_run
    autoreload.raise_last_exception()
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 252, in raise_last_exception
    six.reraise(*_exception)
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper
    fn(*args, **kwargs)
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Users/konstantin/Django/myhellowebapp/venv/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
    module = import_module(entry)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named collection

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artyom Innokentiev, 2016-05-18
@kon-rafikov

Go through the official tutorial better - here . There is nothing better than documentation!

D
Dima Cherny, 2016-05-18
@DemosBlack

try typing python3 manage.py runserver like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question