Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update the sqlite3 module? #123

Closed
josephernest opened this issue Apr 13, 2018 · 2 comments
Closed

How to update the sqlite3 module? #123

josephernest opened this issue Apr 13, 2018 · 2 comments

Comments

@josephernest
Copy link

josephernest commented Apr 13, 2018

I'm using Python 2.7.6 on my Debian. I compiled a Sqlite extension spellfix, I get this error when loading it: sqlite3.OperationalError: ./spellfix.so: undefined symbol: sqlite3_malloc64.

I think it might be because the sqlite3 module is too old:

import sqlite3
print sqlite3.version          # 2.6.0
print sqlite3.sqlite_version   # 3.8.2

(On another machine where sqlite3.sqlite_version is 3.8.7.x the extension loads fine).

I tried:

pip install --upgrade pysqlite

but it's still the same: sqlite3.sqlite_version stays 3.8.2.

How to upgrade the Python sqlite3 module?

@berkerpeksag
Copy link

pip install --upgrade pysqlite will only upgrade the pysqlite module, not the underlying SQLite library. In order to upgrade SQLite, you either need to use the system package manager (apt-get update sqlite3 for example) or build your own pysqlite with a newer SQLite. You can use the snippet posted by Gerhard at #95 (comment) to do the latter (note that you may need to add ext.include_dirs.append(".") before line 152 in

build_ext.build_extension(self, ext)
)

@josephernest
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants