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

Offer pysqlite3-binary as a solution instead of compiling your own #15

Open
pmdevita opened this issue Sep 24, 2022 · 0 comments
Open

Comments

@pmdevita
Copy link

The Readme points to some instructions for building pysqlite3, but that may not actually be necessary. The pysqlite3 project offers precompiled binaries, I was able to get things working through just pip install pysqlite3-binary.

pysqlite3 does not replace sqlite3 though and by default, it seems Django will still attempt to import the normal package. I had to add these lines to my settings.py to get it to work.

# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
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

1 participant