Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
846 views
in Technique[技术] by (71.8m points)

sqlite - Heroku python app failing to build when installing sqlite3

My Python app on Heroku failed to build consistently:

-----> Python app detected
 !     Python has released a security update! Please consider upgrading to python-3.6.8
       Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Found python-3.6.4, removing
-----> Installing python-3.6.7
-----> Installing pip
-----> Installing SQLite3
 !     Push rejected, failed to compile Python app.
 !     Push failed

It is a Django application that runs fine locally.

python-3.6.7 specified in runtime.txt, and I've tried other versions.

My Procfile contains:


release: python <appname>/manage.py migrate
web: python <appname>/manage.py runserver 0.0.0.0:$PORT

I could probably use gunicorn but that's irrelevant here. The build logs doesn't seem to provide me any information.

requirements.txt

chardet==3.0.4
Django==2.0.2
idna==2.6
pytz==2018.3
requests==2.18.4
urllib3==1.22
dj-database-url==0.5.0
setuptools==1.0.0
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this in your app.json. Although it a temporary solution

"buildpacks": [
    {
      "url": "https://github.com/heroku/heroku-buildpack-python.git#remove- 
              sqlite"
    },

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...