I am trying to use Heroku with Python, I have successfully executed "hello word" with Flask .
Now I want to deploy a very basic application using sqlite3 and Flask, and I know that the application works. But itβs hard for me to make it work, and I suspect that the problem is sqlite related.
When I launched the Python shell that Heroku provides, here is the import error log:
$ heroku run python Running python attached to terminal... up, run.2 Python 2.7.1 (r271:86832, Jun 26 2011, 01:08:11) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ImportError: No module named _sqlite3 >>>
Do I need to add something to requirements.txt
, the file used for dependencies? It contains only Flask==0.8
. Importing date and time into examples works as expected. I watched using heroku logs
and this message also appears without any other important messages.
Do I have a way to use any sqlite3 on Heroku? Thanks for the help.
source share