mac389
mac389

Reputation: 3133

How do I deploy on Heroku a Python wrapper?

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?

Upvotes: 0

Views: 63

Answers (1)

Kenny Aires
Kenny Aires

Reputation: 1438

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

Upvotes: 2

Related Questions