I am a beginner at python and SQL. I have an upsert clause to my SQL command but my Python SQLite standard library is running on sqlite v3.21 which does not support upsert syntax. The upsert clause only works on SQLite v3.24 and above.
# UPSERT syntax established by PostSQL, Inputs data into SQLite database
c1.executemany("INSERT INTO result(_time,src_ip) VALUES(?,?) ON "
"CONFLICT(src_ip) DO UPDATE SET Count=Count+1;", to_db)
I tried pip install --upgrade pysqlite
,pip install --upgrade sqlite3
, and many other commands but it did not update my SQLite Library. It seems Python 3.7.1 does not support SQLite v3.24 and above.
Is there a way to update Python3 SQLite library to v3.24? Is there a way I can download sqlite v3.24+ package to import it to my script?
Thank you!