python - 添加一个自制的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 吗?
解决方案
尝试在 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
推荐阅读
- javascript - 可以同时使用提交和ajax吗?
- javascript - 绝对值中的 JavaScript 网格
- angular - 禁用(单击)划分内的元素 - Angular/Typescript
- c# - 无法将 excel 列值复制到另一个 excel 文件中的指定范围
- ruby-on-rails - rails 5 中 time_field 中的默认值
- javascript - 为什么当我用 JavaScript 嵌入 PHP 时,我的 PHP 没有激活?
- python - Python 正则表达式:使用 re.sub 在字符串中添加“-”
- python-2.7 - 未收集使用 PyInstaller 打包的 Pytest 测试
- spring-boot - 无法在springboot中使用户具有不同的角色
- php - 我想显示数据库中的所有图像,但我只能显示一个