gpt4 book ai didi

python - 无法将 python 代码部署到 heroku

转载 作者:太空宇宙 更新时间:2023-11-04 05:02:08 25 4
gpt4 key购买 nike

所以我刚开始学习制作一个 python 机器人并将其部署到 heroku。我想做一个线机器人。

我按照 Line 和教程中的说明进行操作,我下载了 sample-echo python 文件并想尝试将它部署到 heroku。

我一步一步地按照heroku中的说明操作,当我想做的时候

$ git push heroku master

我有错误

-----> Failed to detect app matching https//codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz buildpack Push failed

我已经将 buildpacks 设置为 python,这是主目录的 ss this is the master directory

我真的希望有人能帮我解决这个错误,无论如何,谁能推荐一个好的网络来学习使用 python 制作在线聊天机器人?

非常感谢

最佳答案

此问题已得到解决 here

Resolution

This error message means that Heroku was unable to automaticallydetect the type of app you're trying to deploy: Ruby, Node, Python,PHP, Java, etc. We look for signatures for each language we support(like a pom.xml file or package.json file).

Most apps have at least one of these signatures present, so if you seethis error, it usually means an important file isn't checked into yourgit repository:

Java: pom.xml
Ruby: Gemfile
Node.js: package.json
Python: requirements.txt / setup.py / Pipfile
PHP: composer.json / index.php

You should git add {file}, git commit -am 'added {file}' and then gitpush heroku master.

在 .git 文件夹中添加文件 requirement.txt 是不够的,您必须执行命令添加它然后推送它。它应该可以解决问题。

关于python - 无法将 python 代码部署到 heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45449798/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com