构建包失败
Failed for buildpack
我正在尝试 运行 我的 heroku 上的 python 文件。我尝试不设置构建包,也尝试设置构建包,但似乎都不起作用。我分支中的唯一文件是 .py 和 .git 文件夹
这是一个错误示例:
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 590 bytes | 590.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to google-results.
remote:
https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-python
您的 git 存储库中还需要以下 2 个文件:runtime.txt 和 requirements.txt
runtime.txt 负责您的程序将使用哪个 Python 版本。
cat runtime.txt
python-3.7.2
支持 runtime.txt 版本会不时更改,因此请查看 https://devcenter.heroku.com/articles/python-runtimes
需要 requirements.txt 来指定您的项目依赖于 https://pypi.org/ 中的哪些库。请务必指定版本以避免损坏。
您可以使用以下命令获取当前安装的 python 库的列表:python -m pip freeze > requirements.txt
我正在尝试 运行 我的 heroku 上的 python 文件。我尝试不设置构建包,也尝试设置构建包,但似乎都不起作用。我分支中的唯一文件是 .py 和 .git 文件夹 这是一个错误示例:
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 590 bytes | 590.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to google-results.
remote:
https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-python
您的 git 存储库中还需要以下 2 个文件:runtime.txt 和 requirements.txt
runtime.txt 负责您的程序将使用哪个 Python 版本。
cat runtime.txt
python-3.7.2
支持 runtime.txt 版本会不时更改,因此请查看 https://devcenter.heroku.com/articles/python-runtimes
需要requirements.txt 来指定您的项目依赖于 https://pypi.org/ 中的哪些库。请务必指定版本以避免损坏。
您可以使用以下命令获取当前安装的 python 库的列表:python -m pip freeze > requirements.txt