I am building a python 3.6
AWS Lambda deploy package and was facing an issue with SQLite
.
In my code I am using nltk
which has a import sqlite3
in one of the files.
Steps taken till now:
Deployment package has only python modules that I am using in the root. I get the error:
Unable to import module 'my_program': No module named '_sqlite3'
Added the _sqlite3.so from
/home/my_username/anaconda2/envs/py3k/lib/python3.6/lib-dynload/_sqlite3.so
into package root. Then my error changed to:Unable to import module 'my_program': dynamic module does not define module export function (PyInit__sqlite3)
Added the SQLite precompiled binaries from
sqlite.org
to the root of my package but I still get the error as point #2.
My setup: Ubuntu 16.04
, python3 virtual env
AWS lambda env: python3
How can I fix this problem?