Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
4.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

First make sure the path using: $env:psmodulePath. Then use Import-Module to import


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...