OS Linux Mint 18.3 (but same problem also with version 19)
Python3 and Sqlite3 installed
After a lot of trouble with "pip / pip3", I managed to install Peewee.
I tried running the following sample script with python3 peewee.py
but I get this error:
SCRIPT (peewee.py)
from peewee import *
db = SqliteDatabase("people.db")
class Person(Model):
name = CharField()
birthday = DateField()
class Meta:
database = db # This model uses the "people.db" database.
class Pet(Model):
owner = ForeignKeyField(Person, backref='pets')
name = CharField()
animal_type = CharField()
class Meta:
database = db # this model uses the "people.db" database
db.connect()
ERROR
Traceback (most recent call last):
File "peewee.py", line 3, in <module>
from peewee import *
File "/home/.../peewee.py", line 6, in <module>
db = SqliteDatabase("people.db")
NameError: name 'SqliteDatabase' is not defined
I've already done an extensive research on google / StackOverflow, but I can't solve this problem. Could you please help me?