try this:

./manage.py shell
>>> import psycopg2

If you get an error, check your path *in the same session* as before:

>>> import sys
>>> print sys.path

and make sure psycopg2 is in one of those listed directories, either
physically or through a syslink. Django sets up its own environment,
which can be different from the system one.

cheers
Giacomo


On Tue, Sep 16, 2008 at 1:46 AM, Stuart Grimshaw
<[EMAIL PROTECTED]> wrote:
>
> Trying to set up a new Django project on a fresh OSX Leopard install,
> and when i run syncdb, I get the following error:
>
> Traceback (most recent call last):
>  File "./manage.py", line 11, in <module>
>    execute_manager(settings)
>  File "/Library/Python/2.5/site-packages/django/core/management/__init__.py",
> line 340, in execute_manager
>    utility.execute()
>  File "/Library/Python/2.5/site-packages/django/core/management/__init__.py",
> line 295, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File "/Library/Python/2.5/site-packages/django/core/management/base.py",
> line 77, in run_from_argv
>    self.execute(*args, **options.__dict__)
>  File "/Library/Python/2.5/site-packages/django/core/management/base.py",
> line 95, in execute
>    self.validate()
>  File "/Library/Python/2.5/site-packages/django/core/management/base.py",
> line 122, in validate
>    num_errors = get_validation_errors(s, app)
>  File 
> "/Library/Python/2.5/site-packages/django/core/management/validation.py",
> line 22, in get_validation_errors
>    from django.db import models, connection
>  File "/Library/Python/2.5/site-packages/django/db/__init__.py", line
> 16, in <module>
>    backend = __import__('%s%s.base' % (_import_path,
> settings.DATABASE_ENGINE), {}, {}, [''])
>  File 
> "/Library/Python/2.5/site-packages/django/db/backends/postgresql_psycopg2/base.py",
> line 20, in <module>
>    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading psycopg2
> module: No module named psycopg2
>
> Sounds simple enough, but I have "py25-psycopg2" installed via
> macports, not sure what to try next, really, but that could just be
> the time of night.
>
> Anyone got any ideas?
>
> --
> -S
>
> Follow me on Twitter: http://twitter.com/stubbs
> Blog: http://stubblog.wordpress.com
> My art: http://stuartgrimshaw.imagekind.com
> Stock Images: http://psc.photoshelter.com/user/stuartgrimshaw
>
> >
>



-- 
Giacomo Lacava

--~--~---------~--~----~------------~-------~--~----~
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
Feeds available at http://groups.google.com/group/python-north-west/feeds
For more options: http://groups.google.com/group/python-north-west
-~----------~----~----~----~------~----~------~--~---

Reply via email to