0

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.

1
  • Welcome to Stack Overflow. Please don't post screenshots of text. They can't be searched or copied and offer poor usability. Instead, paste the code as text directly into your question. If you select it and click the {} button or Ctrl+K the code block will be indented by four spaces, which will cause it to be rendered as code.
    – Chris
    Commented Sep 19, 2020 at 11:50

2 Answers 2

1

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.

0
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.