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
408 views
in Technique[技术] by (71.8m points)

django - Heroku does not upgrade python version

I am trying to deploy a django project in Heroku but the package django-mongoengine needs a python version >=3.7.
I have declare the runtime.txt file with one of the aviable python versions for Heroku but when I deploy the project, python-3.6.12 is still being installed.

Total 4 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Python app detected
remote: -----> Installing python-3.6.12
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting Django==3.0.5
remote:          Downloading Django-3.0.5-py3-none-any.whl (7.5 MB)
remote:        Collecting django-mongoengine==0.4.4
remote:          Downloading django-mongoengine-0.4.4.tar.gz (186 kB)
remote:          Installing build dependencies: started
remote:          Installing build dependencies: finished with status 'done'
remote:          Getting requirements to build wheel: started
remote:          Getting requirements to build wheel: finished with status 'done'
remote:            Preparing wheel metadata: started
remote:            Preparing wheel metadata: finished with status 'done'
remote:        ERROR: Package 'django-mongoengine' requires a different Python: 3.6.12 not in '>=3.7'
remote:  !     Push rejected, failed to compile Python app.

The content of my runtime file is:

python-3.7.9

And my Procfile file is:

web: gunicorn graffitisWeb.wsgi

Also the structure of the project is:


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        02/12/2020     10:13                ayuntamientoApp
d-----        22/01/2021     17:25                clienteApp
d-----        02/12/2020     10:13                Ejemplos bd
d-----        21/01/2021      9:55                graffitiApp
d-----        21/01/2021      9:56                graffitisWeb
-a----        21/01/2021      9:55            314 .gitignore
-a----        23/11/2020     13:05            653 manage.py
-a----        21/01/2021     11:24             31 Procfile
-a----        21/01/2021      9:55           4490 README.md
-a----        22/01/2021     18:04           2412 requirements.txt
-a----        22/01/2021     18:11             12 runtime.txt

Is there anything wrong that I am doing? Or is this a problem of Heroku? Thanks.

question from:https://stackoverflow.com/questions/65850051/heroku-does-not-upgrade-python-version

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

1 Answer

0 votes
by (71.8m points)
Waitting for answers

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

...