I wanted to check which version of sqlite I had, which has become way more confusing than I expected. To start fresh, I created a new conda environment with:
conda create --name my_env_name python=3.6 sqlite hdf5 pandas
The shell message said it would install sqlite: 3.13.0-1
in the new environment, along with a few other packages.
Then, after activating that new conda environment, I immediately ran pip freeze
, but the list of packages I see does not include any entry for sqlite
.
Finally, I just enter python
from the terminal (in this conda env) to enter a system python in my shell. The opening message says python version 3.6.1, confirming I'm in that newly created environment. But then
import sqlite3
sqlite3.version
outputs '2.6.0'
What's going on? Do I have sqlite3 version 3.13 installed or 2.6? If my sqlite3 version is 2.6, how do I get something newer? That would be pretty old.
Version 2. April 6, 2022. androidx. sqlite:sqlite:2.3. 0-alpha02 , androidx. sqlite:sqlite-framework:2.3.
SQLite is self-contained means it requires minimal support from the operating system or external library. This makes SQLite usable in any environment especially in embedded devices like iPhones, Android phones, game consoles, handheld media players, etc. SQLite is developed using ANSI-C.
Check for SQLite The first thing to do is to check whether SQLite is installed on your system or not. You can do this simply by entering sqlite3 into your system's command line interface (assuming version 3+ is installed). For example, on a Mac, open the Terminal and enter sqlite3 .
Import sqlite3 into your python script:
import sqlite3
Add the following lines to your script:
print "SQLite Version is:", sqlite3.sqlite_version
print "DB-API Version is:", sqlite3.version
Running the script produced the following results for me (your results may differ):
SQLite Version is: 3.11.0
DB-API Version is: 2.6.0
This information is documented in The Python Standard Library, "Section 12.6.1. Module functions and constants" https://docs.python.org/3/library/sqlite3.html
Yes, you have installed the sqlite: 3.13.0-1
version of sqlite database. If you want to check, run sqlite3 --version
import sqlite3
sqlite3.version
Here you get version for DB-API 2.0 interface for SQLite which is 2.6.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With