runserver error on Mac OSX 10.5.5

132 views
Skip to first unread message

jconway

unread,
Nov 27, 2008, 12:02:50 AM11/27/08
to Django users
I just did a django install on my Macbook Pro (2.5 GHz Intel Core 2
Duo) running 10.5.5. I can create projects with startproject and they
are populated with manage.py, settings.py, settings.pyc and urls.py.

The problem is when I try to run the server, I get the following
errors. Thoughts?

$ python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at
0x65bdb0>
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/django/core/management/commands/
runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/django/core/management/base.py", line 246,
in validate
num_errors = get_validation_errors(s, app)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/django/core/management/validation.py",
line 22, in get_validation_errors
from django.db import models, connection
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/django/db/__init__.py", line 22, in
<module>
backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {},
[''])
ImportError: No module named dummy.base

Horst Gutmann

unread,
Nov 27, 2008, 4:03:41 AM11/27/08
to django...@googlegroups.com
Are you sure, that your django installation is complete? Esp.: Do you
have a db/backends/dummy/base.py and a db/backends/dummy/__init__.py
in /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/
?

-- Horst

Malcolm Tredinnick

unread,
Nov 27, 2008, 9:11:58 PM11/27/08
to django...@googlegroups.com

On Thu, 2008-11-27 at 10:03 +0100, Horst Gutmann wrote:
> Are you sure, that your django installation is complete? Esp.: Do you
> have a db/backends/dummy/base.py and a db/backends/dummy/__init__.py
> in /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/
> ?

Also, if you're just starting out with Django, why are you setting
DATABASE_ENGINE='dummy'? It's not one of the database backends that we
document or suggest for use. Mostly there for historical reasons.

Regards,
Malcolm


jconway

unread,
Nov 28, 2008, 1:38:05 AM11/28/08
to Django users
Horst & Malcolm

Thank you for your suggestions, they helped me determine that the
problem is machine specific.

On Nov 27, 3:03 am, "Horst Gutmann" <ze...@zerokspot.com> wrote:

> Are you sure, that your django installation is complete? Esp.: Do you
> have a db/backends/dummy/base.py and a db/backends/dummy/__init__.py
> in /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/s ite-packages/django/

Yes, these files are in these locations and are not damaged as far as
I can tell.

On Nov 27, 8:11 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:

> Also, if you're just starting out with Django, why are you setting
> DATABASE_ENGINE='dummy'? It's not one of the database backends that we
> document or suggest for use. Mostly there for historical reasons.

I didn't set anything for the DATABASE_ENGINE, it was empty. I was
going thru the tutorial and made it to the section called "The
development server". At that point I had not touched the settings.py.
After your message above I opened the settings.py and made sqlite3 the
DATABASE_ENGINE. I tested and got essentially the same error initially
reported except the last line said something about no module named
_sqlite3.

On the computer with the problems noted above I had installed django
using Macports (I installed Macports specifically for this django
install) I uninstalled Macports and removed all the django files I
could find, then ran setup.py install "manually" but no luck.

I went to another computer with just the default mac os x 10.5.5
installed and was able to install a fully functional version of django
in about 10 minutes (manually, instead of using Macports).So, for my
purposes, I consider this problem solved. (although if anyone has any
ideas that will save me from doing a clean system install on my
primary computer just to get django running on it, I'm open to
suggestions)

thank you for your help

james

Horst Gutmann

unread,
Nov 28, 2008, 3:49:08 AM11/28/08
to django...@googlegroups.com
MacPorts fragments a normal Python installation up into multiple
smaller packages. For example: The sqlite3 support which is actually
part of the core Python package is there in py25-sqlite3. But if
you've already uninstalled MacPorts this is moot now, except if you
want to reinstall it to get things like PostgreSQL and MySQL.

I have never tried getting Django to work with the version of Python
that is bundled with MacOSX 10.5.x but it should normally work out of
the box.

>
> I uninstalled Macports and removed all the django files I
could find, then ran setup.py install "manually" but no luck.
>

What error did you get then?

-- Horst

jconway

unread,
Nov 28, 2008, 3:13:44 PM11/28/08
to Django users


On Nov 28, 2:49 am, "Horst Gutmann" <ze...@zerokspot.com> wrote:

> > I uninstalled Macports and removed all the django files I
> > could find, then ran setup.py install "manually" but no luck.
>
> What error did you get then?
>

copying build/scripts-2.5/django-admin.py -> /usr/local/bin
error: /usr/local/bin/django-admin.py: No such file or directory

While cleaning up from previous install attempts I missed a symlink to
"django-admin.py" in /usr/local/bin. I removed it, ran setup.py and
now everything seems to be working.

thanks

james
Reply all
Reply to author
Forward
0 new messages