1👍
The error here appears to stem from the lack of the development headers for sqlite
compilation in the AWS environment.
In your ubuntu environment, the development headers likely already exist, and you can confirm that they do with something like:
$ dpkg -l | grep sqlite
ii libsqlite3-0:amd64 3.31.1-4ubuntu0.3 amd64 SQLite 3 shared library
ii libsqlite3-dev:amd64 3.31.1-4ubuntu0.3 amd64 SQLite 3 development files
Since the author of pysqlite3
has provided both the source distribution and a precompiled binary version, you should only add one to the requirements file you intend to ship to Elastic Beanstalk – pysqlite-binary
(https://pypi.org/project/pysqlite-binary/)
Then you should be able to use it via import pysqlite3
0👍
As mike said:
I add to requirements.tht just:
pysqlite3-binary==0.5.0
I also added in settings.py:
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
before:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
- [Answered ]-List objects in rows with one editable field (Model formset)
- [Answered ]-Is there a tool to view the child class and all its attributes and methods inherited from multiple parents in Django / Python?
- [Answered ]-About deploying a Django project on Apache + mod_python
- [Answered ]-Django + socialauth: login with openid or admin
Source:stackexchange.com