【问题标题】:Why can't Heroku find a version of 'os' that satisfies the requirement?为什么 Heroku 找不到满足要求的 'os' 版本?
【发布时间】:2020-02-16 07:10:30
【问题描述】:

我正在尝试通过 GitHub 在 Heroku 上部署我的机器人。

在 requirements.txt 中,我有 'os'。我尝试部署机器人,以便 Heroku 能够识别 Procfile。它给了我这个错误。

Collecting os (from -r /tmp/build_e656b8b6627c307b02ef77c47e6bb725/requirements.txt (line 3))
         Could not find a version that satisfies the requirement os (from -r /tmp/build_e656b8b6627c307b02ef77c47e6bb725/requirements.txt (line 3)) (from versions: )
       No matching distribution found for os (from -r /tmp/build_e656b8b6627c307b02ef77c47e6bb725/requirements.txt (line 3))
 !     Push rejected, failed to compile Python app.
 !     Push failed

如何解决?

【问题讨论】:

    标签: python github heroku discord.py


    【解决方案1】:

    您不需要在您的 requirements.txt 中包含 os - 它是一个内置模块。只需将其删除。

    【讨论】:

      【解决方案2】:

      您不需要安装/需要os。它不在包索引上,它是一个内置包。

      只需从您的 requirements.txt 文件中删除 os 行即可解决此问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-07-08
        • 1970-01-01
        • 2018-04-28
        • 2023-03-20
        • 2021-12-25
        • 2018-10-13
        • 2019-07-18
        • 2020-04-15
        相关资源
        最近更新 更多