Path problem

With a django project, if I try runserver, I get this:

/usr/bin/python manage.py runserver 8000

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x1078d2850>>

Traceback (most recent call last):

  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run

    self.validate(display_num_errors=True)

  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 266, in validate

    num_errors = get_validation_errors(s, app)

  File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 23, in get_validation_errors

    from 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 92, in __getitem__

    backend = load_backend(db['ENGINE'])

  File "/Library/Python/2.7/site-packages/django/db/utils.py", line 24, 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 16, in <module>

    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/leehinde/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib

  Referenced from: /Users/leehinde/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so

  Reason: image not found

The same command works fine if I run it from terminal.
I've seen past comments about path settings (http://devnet.jetbrains.net/message/5292163#5292163)  and the tips seem to be out of date, for Lion.  I'd appreciate any current advice.
Thanks.
(mac, Lion)
0
2 comments

Please make sure that any environment variables needed for libraries to be resolved correctly are defined in launchd.conf, not in your bash profile:

thttp://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034#277034

0

I'm not sure what I'm supposed to be setting there. Why isn't the configuration within the prefs dialog sufficient?

0

Please sign in to leave a comment.