0

I am trying to deploy a program on heroku. The program uses Flask and Python. It does not make any calls to a database.

It runs locally without an issue.

It builds successfully on heroku.

But when I interact with the web page, an AJAX call fails because it lacks a dependency. Error message:

POST https://hal-stage.herokuapp.com/reason 500 (Internal Server Error)

Inspecting the logs shows:

2020-02-29T23:45:05.133568+00:00 app[web.1]: raise InstallError('The SDD library is not available. Please install the PySDD package.')
2020-02-29T23:45:05.133574+00:00 app[web.1]: problog.errors.InstallError: The SDD library is not available. Please install the PySDD package..

The PySDD library is part of requirements.txt.

How do I push to heroku the underlying SDD library?

1 Answer 1

2

You must add all dependencies on your pipfile, for example:

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true


[packages]

Flask = "*"
PySDD = "*"

[requires]

python_version = "3.6"

Hope it suits well

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, this helps somewhat. What if I want to deploy with a Python package on my computer that I compiled from source? How do I upload that folder (i.e. from site-packages)?
OP says they are using a requirements.txt file, which means pip, not Pipenv. If so, they should continue to use that file instead of adding a Pipfile. (If Heroku finds a Pipfile and Pipfile.lock it will completely ignore the requirements.txt, which could easily lead to other missing dependencies.)
@mac389 this answer might give you some light about compiled packages on heroku.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.