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

标签 python github heroku discord.py

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

在 requirements.txt 中,我有“操作系统”。我尝试部署机器人,以便 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

如何解决?

最佳答案

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

关于python - 为什么Heroku找不到满足要求的 'os'版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58465220/

相关文章:

windows - 安装 GitHub 桌面时出错 "Application cannot be started, contact the application vendor."

python - 在 Pandas 中为层次索引的内部维度选择不同的值

python - Matplotlib FuncAnimation 只绘制一帧

python - 保存文件 python

git - 如何在 github repo 的文件夹/目录中获取最后提交日期?

git - 使用 git 子树推送到项目根目录

python - 重定向所有对 www 的请求。到根域

ssl - 有什么方法可以在免费的 heroku dyno 上添加免费的 SSL 证书?

ruby-on-rails - 如何逐行读取 ruby​​ 中的文本文件(将其托管在 s3 上)?

python 2.7 : making a dictionary object from a specially-formatted list object