是因为settings.py中sqlite3的数据库名称搞错了:

DATABASES = {

    'default': {

        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.

        #'NAME': 'task.db', # Or path to database file if using sqlite3.

        'NAME': os.path.join(os.path.dirname(os.path.dirname(__file__)), 'task.db'), # Or path to database file if using sqlite3.

        # The following settings are not used with sqlite3:

        'USER': '',

        'PASSWORD': '',

        'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.

        'PORT': '', # Set to empty string for default.

    }

}

这里本应该是数据库文件的路径,直接写成task.db是在settings.py同目录下,然而python manage.py syncdb却把task.db生成在了上一级目录及manage.py同目录,导致找不到数据库。