为了账号安全,请及时绑定邮箱和手机立即绑定

为什么 Heroku 找不到满足要求的 'os' 版本?

为什么 Heroku 找不到满足要求的 'os' 版本?

千万里不及你 2022-06-28 15:44:26
我正在尝试通过 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如何解决?
查看完整描述

2 回答

?
慕桂英546537

TA贡献1848条经验 获得超10个赞

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



查看完整回答
反对 回复 2022-06-28
?
米脂

TA贡献1836条经验 获得超3个赞

你不需要 install/require os。它不在包索引上,它是一个内置包。

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


查看完整回答
反对 回复 2022-06-28
  • 2 回答
  • 0 关注
  • 162 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号