14π
I ran into this issue recently and was able to adjust it by changing the python version in the runtime.txt.
Changing to
python-3.5.2
But based off your requirements that you have listed, it seems like you are never getting to the requirements_base.txt.
In your requirements_server.txt file, change it so that:
-r requirements_base.txt
is listed there.
6π
I simply had two typos in my runtime.txt
Make sure it says python-3.6.1
and not Python-3.6.1
or python 3.6.1
The error message is pretty bad. May this post save someone 30 minutes.
2π
Looks like Heroku now supports only 3.6.1
and 2.7.13
Python versions.
https://devcenter.heroku.com/articles/python-runtimes#supported-python-runtimes
- Django backup strategy with dumpdata and migrations
- Django email
- Django_auth_ldap no module named ldap
- Django limit_choices_to on user group
- How to get django queryset results with formatted datetime field
0π
If you are using the default heroku buildpack I would guess that the requirements.txt file in your project folder is missing.
0π
I had the same problem on Ubuntu 16.04 and after manually installing Heroku CLI, using
wget https://cli-assets.heroku.com/branches/stable/heroku-REPLACE_ME_OS-REPLACE_ME_ARCH.tar.gz -O heroku.tar.gz
mkdir -p /usr/local/lib
tar -xvzf heroku.tar.gz -C /usr/local/lib
/usr/local/lib/heroku/install
it worked like a charm.
In the folder I have 4 files. One is python script, second is procfile (no extension) with content web: gunicorn skripta1:app
. Third is requirements.txt with:
appdirs==1.4.3
bokeh==0.12.5
click==6.7
Flask==0.12.2
gunicorn==19.7.1
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
numpy==1.12.1
packaging==16.8
pandas==0.20.1
pandas-datareader==0.4.0
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
PyYAML==3.12
requests==2.14.2
requests-file==1.4.2
requests-ftp==0.3.1
six==1.10.0
tornado==4.5.1
Werkzeug==0.12.2
And fourth is runtime.txt with python-3.5.2
- Django Admin, accessing reverse many to many
- How does Django foreign key access work
- Django query how to write: WHERE field LIKE '10__8__0__'?
0π
According to Heroku documentation, the only two officially supported python runtimes are 2.7.13, and 3.6.1.
I recently had the same issue with oTree deployment in heroku, but as soon as I changed runtime.txt
to python-3.6.1
everything went smoothly.
- Is npm in Node like virtualenv in Django?
- Django Celery Task Logging
- Django QuerySet object has no attribute 'objects
0π
Oh dear β I removed a blank line in my requirements/production.txt
in order to try and change the line number and everything started working (or rather on to my next completely different error)
- Django_auth_ldap no module named ldap
- Django serialize multiple objects in one call
- Raising ValidationError from django model's save method?
- How to configure Apache to run ASGI in Django Channels? Is Apache even required?
0π
I ran into this same problem on Windows trying to deploy a Python app to Heroku. Turns out it was a file encoding problem. Depending on how you create Procfile, requirements.txt and runtime.txt your encoding may vary.
Assuming youβre running Windows, use PowerShell. Get the following PowerShell Function and paste it in to your PowerShell console. Using this, you can check your file encoding:
get-fileencoding requirements.txt
If it comes back anything besides ascii thatβs probably the issue. In my case, my three files were all unicode. I just did this to force them to ASCII:
'python-3.6.1' | out-file -en ascii runtime.txt
You can also use an editor and then save the file using ASCII encoding.
Once I made this change to my Procfile, requirements.txt and runtime.txt I was able to successfully deploy to Heroku.
0π
I was switching from app engine to heroku and had a setup.cfg file in the root directory with following content:
[install]
prefix=
It caused this issues while deployment. After removing everything went well.