首页 > 解决方案 > 添加一个自制的python模块到我的heroku应用程序

问题描述

我正在尝试启动 Python-Heroku 应用程序。我的应用程序要求之一是将自制模块保存到 *.tar.gz 中。我在本地环境中正确加载了模块,但是当我将它加载到 Heroku 中时它找不到它。

git add .
git push heroku master

! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/dash-alphav6.git'

你知道如何将我的自制模块上传到 Heroku 吗?

标签: pythonherokuplotly-dash

解决方案


尝试在 GitHub 上托管您的模块,然后添加 git repo 并执行 pip install 此方法由 Heroku 自己的支持描述:https ://devcenter.heroku.com/articles/python-pip#git-backed-distributions 对于公共 repos:

git+git://github.com/kennethreitz/requests.git

对于私人回购:

git+https://user:password@github.com/nsa/secret.git

推荐阅读