Open kutschkem opened 2 years ago
Probably not gonna help you, but for reference. I had the same problem on Kali Linux and found out that it is caused by sqlite3ext.h not being provided in the sqlite package. Solved it by running
apt-file search sqlite3ext
and then based on the results installing libsqlite3-dev package which provides sqlite3ext.h Afterwards i was able to do pip install normally. On my Arch machine everything worked out of the box as sqlite package provides sqlite3ext by default.
So my assumption is you have to find a way to install sqlite in a way that provides the sqlite3ext shared file, or download it from sqlite sources and add it to a place where your compiler will find it.
I'm encountering the same issue on Windows. I'll look into this and update here if I find a solution. Hints are appreciated :slightly_smiling_face:
@rmitsch I didn't find a solution, but my workaround was this instead of using spellfix (I wanted to spellfix to get some string distance measure):
from Levenshtein import distance as levenshtein_distance
con.create_function('levenshtein',2,levenshtein_distance)
cur.execute("""
SELECT file_origin.filename,
file_origin.original_path,
file_migrated.new_path,
levenshtein(original_path,new_path) as levenshtein_dist
FROM file_origin
JOIN file_migrated
ON file_origin.filename = file_migrated.filename
""")
@kutschkem Thanks for the reply! I was thinking of custom functions too, but they are nowhere near the runtime performance with spellfix1
in my experience (and performance is critical for my use case, unfortunately).
When trying to install sqlite-spellfix via pypi, I get the following output:
I am using Python 3.6 on Windows 10. I see the missing include is the error, but don't know what to do about it.