简体   繁体   中英

sqlite3 not found in virtualenv

I've just installed python and Django in a vitual env. All seems to work except when I type python manage.py dbshell when I get:

CommandError: You appear not to have the 'sqlite3' program installed or on your path.

I thought that Django would install sqlite3 by default.

In settings.py I have this:

DATABASES = {
    'default': 
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

Any help would be appreciated.

Run sudo apt-get install sqlite3 and then try to sync your database again. If your path does not contain your specified database file django will automatically create one however, sqlite3 does not come prepackaged with django as far as I am aware of.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM