【问题标题】:Heroku Python app with custom package in Aptfile : no python packages installed from requirements.txtHeroku Python 应用程序在 Aptfile 中有自定义包:没有从 requirements.txt 安装 python 包
【发布时间】:2016-03-10 08:44:04
【问题描述】:

我正在尝试安装一个软件包,我被指出安装 heroku-buildpack-apt 和 heroku-buildpack-multi 的方向。这似乎可行,现在项目建立在遥控器上,我已经安装了 multi 使用:

heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git

并通过在.buildpacks 文件https://github.com/ddollar/heroku-buildpack-apt 中包含其引用来安装apt-get

现在将包放入Aptfile,即:

libgeoip-dev

遥控器现在已构建,但我抱怨找不到 gunicorn,我认为这是某种冲突,因为它在 requirements.txt 中列出,Aptfile 是否覆盖要求?

【问题讨论】:

  • 似乎您应该包含 heroku/python buildpack,因为这就是安装 requirements.txt 依赖项的原因。

标签: python heroku pip apt requirements.txt


【解决方案1】:

将heroku/python 添加到您的构建包运行

heroku buildpacks:clear # to clear previous configs
heroku buildpacks:add --index 1 heroku-community/apt # to enable heroku build packages in Aptfile
heroku buildpacks:add --index 2 heroku/python # to install python libs in requirement.txt 

应该在你的下一次推送中构建两者

【讨论】:

    猜你喜欢
    • 2020-09-05
    • 2012-12-29
    • 2018-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-31
    • 2018-03-19
    • 1970-01-01
    相关资源
    最近更新 更多