django - python manage.py runserver not working on Macbook 10.8 -
running folllowing command
$python2.6 manage.py runserver
gives ouput:
traceback (most recent call last): file "manage.py", line 8, in <module> django.core.management import execute_from_command_line importerror: no module named django.core.management
i tried many solutions out there of no use.
when try install django again using pip,
$ pip install django
it give following output:
requirement satisfied (use --upgrade upgrade): django in /library/python/2.7/site-packages cleaning up...
and trying
$ pip freeze
gives following output,
django==1.5.4 mysql-python==1.2.4 ... ... ... wsgiref==0.1.2 xattr==0.6.2 zope.interface==3.5.1
i dont know do? please wasted whole trying run successfully. thanks.
update:
when tried running
$ python2.7 manage.py runserver
it gives me following error
validating models... unhandled exception in thread started <bound method command.inner_run of <django.contrib.staticfiles.management.commands.runserver.command object @ 0x107e63050>> traceback (most recent call last): file "/library/python/2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run self.validate(display_num_errors=true) file "/library/python/2.7/site-packages/django/core/management/base.py", line 280, in validate num_errors = get_validation_errors(s, app) file "/library/python/2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors django.db import models, connection file "/library/python/2.7/site-packages/django/db/__init__.py", line 40, in <module> backend = load_backend(connection.settings_dict['engine']) file "/library/python/2.7/site-packages/django/db/__init__.py", line 34, in __getattr__ return getattr(connections[default_db_alias], item) file "/library/python/2.7/site-packages/django/db/utils.py", line 93, in __getitem__ backend = load_backend(db['engine']) file "/library/python/2.7/site-packages/django/db/utils.py", line 27, in load_backend return import_module('.base', backend_name) file "/library/python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) file "/library/python/2.7/site-packages/django/db/backends/mysql/base.py", line 17, in <module> raise improperlyconfigured("error loading mysqldb module: %s" % e) django.core.exceptions.improperlyconfigured: error loading mysqldb module: dlopen(/users/tg/.python-eggs/mysql_python-1.2.4-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so, 2): library not loaded: libmysqlclient.18.dylib referenced from: /users/tg/.python-eggs/mysql_python-1.2.4-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so reason: image not found
Comments
Post a Comment