Problem upgrading Sqlite3 version on CentOS for Python Problem upgrading Sqlite3 version on CentOS for Python linux linux

Problem upgrading Sqlite3 version on CentOS for Python


When I did it (specifically trying to find a way to update sqlite3 for a running python program; did not work...), I compiled sqlite and got libsqlite3.so.0.8.6, and then replaced the system-wide sqlite3 with that. For me on debian, that was in /usr/lib/x86_64-linux-gnu. I did see (though now I can't find where) that this way may cause issues when updating in the future. It did update python's sqlite3 for me though.


You can import specific versions:

__requires__= 'sqlite3==3.6.20'import pkg_resourcespkg_resources.require("sqlite3==3.6.20")import sqlite

Note that this only works on the first import. If sqlite gets imported before pkg_resources, it will take the latest version.