I am having trouble running sqlite3 in the powershell in VSCode. I already have sqlite3 in my PATH so that is not it. My code is below and seems to be working just fine and it is properly creating the students.db file. However when I go to access it in the terminal I get this.
PS C:UsersDevinDesktopIntermediate Python> sqlite3 students.db
sqlite3 : The term 'sqlite3' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
- sqlite3 students.db
- CategoryInfo : ObjectNotFound: (sqlite3:String) [], CommandNotFoundE
xception
- FullyQualifiedErrorId : CommandNotFoundException
from peewee import *
db = SqliteDatabase('students.db')
class Student(Model):
username = CharField(max_length=255, unique=True)
points = IntegerField(default=0)
class Meta:
database = db
if __name__ == '__main__':
db.connect()
db.create_tables([Student], safe=True)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…