Reputation: 1
I want to deploy my Python / Django application on Heroku but I'm caught up with this weird error. One of the errors I couldn't fix was
wrapt==1.12.1) is not available for this stack (heroku-18)
I have searched everywhere on the internet and pip
installing wrapt==1.12.1
but still, I kept getting the same error. What is the problem, and how can I fix it?
The full error message is below.
Upvotes: 0
Views: 78
Reputation: 2235
After installing wrapt==1.12.1 follow this steps:
Write below command in your reminal:
pip freeze > requirements.txt
git add .
git commit -m "edit"
git push heroku master
Upvotes: 0
Reputation: 137108
You are only quoting part of the error message. Here's a more complete quote:
Requested runtime (appdirs==1.4.4
asgiref==3.2.7
...
wrapt==1.12.1) is not available for this stack (heroku-18
This indicates a problem with your runtime.txt
file. That file isn't for defining your dependencies; it's for telling Heroku what version of Python you want to use. It should only contain something like
python-3.8.5
Dependencies go into a file called requirements.txt
(or, if you're using Pipenv, Pipfile
and Pipfile.lock
, but that doesn't seem to apply here).
I suspect simply renaming your runtime.txt
to requirements.txt
, committing the change, and redeploying will work. If you want to specify a particular Python version, you should also create a new runtime.txt
in the correct format.
Upvotes: 1