W
W
wadadaaa2012-07-29 17:03:52
Django
wadadaaa, 2012-07-29 17:03:52

How to find the path to Django?

After upgrading from 10.6.8 to Mountain Lion 10.8, when I try to start the server, I get this error

python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

and with
>>> import djnago

this is

Traceback (most recent call last):
File "", line 1, in ImportError: No module named djnago

I understand that something in way was lost. How to fix?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
L
larikov, 2012-07-29
@larikov

This helped me.
sudo touch /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/__init__.py
Accordingly, instead of 2.7, your version of python should be

K
ks_ks, 2012-07-29
@ks_ks

$python

>>> import django
>>> django.__file__

X
xSkyFoXx, 2012-07-30
@xSkyFoXx

Depending on how you installed it:
1. If you install python libraries using pip or easy_install, they will go to /System/Library/Frameworks/Python.framework/Versions/…
2. If you install via port, then the interpreter and all libraries end up in /opt/local/Library/Frameworks/Python.framework/Versions…
3. If you build from source, they will end up in the same place as in the first case.

M
moskrc, 2012-07-31
@moskrc

There was a problem with the update. The solution is simple: install (or rather update) XCode, run it and in XCode->Preferences->Downloads->Components click Install next to Command Line Tools. All.

F
falcon, 2016-02-13
@falcon765

python manage.py sync.db

V
Vadim Popov, 2018-07-17
@vadimpopov2003

And what does "Djnago"
have to do with Django???

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question