Good day.
I am having trouble compiling pysqlite on windows. I have managed to start compiling with quite a bit of work but now I am stuck with this error:
d:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -lsqlite3
I have searched for possible solutions but most of the solutions are for linux.
Please help.
Thank you.
when compiling
pysqlite2
from source, you need to edit the filesetup.cfg
which by default should look like:You'll need to uncomment
include_dirs
andlibrary_dirs
(remove the#
) an make sureinclude_dirs
points to the directory with the sqlite3 headers, andlibrary_dirs
to wheresqlite3.dll
can be found.Now you should be able to compile and install pysqlite2. After that, you should put
sqlite3.dll
somwhere it can be found (either somewhere on thePATH
, or intoPython27\Lib\site-packages\pysqlite2
)You should be able to use
import sqlite3
instead and follow this this tutorial. That worked fine for me when dealing with Sqlite3 in Python. If that package doesn't exist try upgrading your version of Python instead, because that will include other useful packages.