On Fri, 2006-05-05 at 02:03 +0000, jbrewer wrote:
> Used DarwinPorts to get sqlite3 and py-sqlite and I still am getting
> the same error as above. I know it "just worked" for Glenn, but I am
> all screwed up.
> 
> I am on Mac OS X 10.4.6 and have all the normal set up, except for the
> above and svn, and django which I installed yesterday.
> 
> I am a bit over my head as I only dabble in the command line from time
> to time.
> 
> Any help would really be appreciated.
> 
> Here is the results from trying to run "python manage.py runserver"
[...]
> Is your DATABASE_ENGINE setting (currently, %r) spelled correctly?
> Available options are: %s" % \
> django.core.exceptions.ImproperlyConfigured: Could not load database
> backend: No module named pysqlite2. Is your DATABASE_ENGINE setting
> (currently, 'sqlite3') spelled correctly? Available options are:
> 'ado_mssql', 'mysql', 'postgresql', 'sqlite3'

Well, as before with your MySQL attempts, Django is not able to import
the Python database wrapper (in this case pysqlite2). It will be easiest
to try and debug this at the python interactive prompt. Essentially, you
want this sort of thing to work (I'm on Linux, not a Mac, but the
principle is the same):
        
        .-([EMAIL PROTECTED] 12:08:38) ~
        `--> python
        Python 2.4.2 (#1, Feb 12 2006, 03:45:41)
        [GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import pysqlite2
        >>>

Now, that will fail for you. So how to debug it? Well, one approach is
to find out where Python is looking for the module: where it expects it
to be. Then you can try to correlate that with where it actually is
installed. Again, at the interactive prompt, try this:

        >>> import sys
        >>> sys.path

I have not included the huge list I get in the result (wow that's a long
list! I need to clean my PYTHONPATH...), but what you would hope to see
is the directory where the pysqlite2 module is installed (usually it
will be something like ..../python2.4/site-packages/ ). 

As I said, I am unfamiliar with how Python on a Mac is installed, others
might be able to tell you what to expect here. But examining sys.path
should give you some clues about where you and Python are disagreeing.

Regards,
Malcolm




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to