Search code examples
pythonlinuxsqliteconda

Figuring out my sqlite version


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.


Solution

  • 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