简体   繁体   English

错误:使用 heroku CLI 部署 Python 应用程序

[英]ERROR:Deploying Python app using heroku CLI

When I enter当我进入

$ git push heroku master $ git 推 heroku 主控

It Shows:表明:

ERROR: Double requirement given: telegram (from -r /tmp/build_996aa7e0/requirements.txt (line 60)) (already in telegram==0.0.1 (from -r /tmp/build_996aa7e0/requirements.txt (line 47)), name='telegram')错误:给出双重要求:电报(来自 -r /tmp/build_996aa7e0/requirements.txt(第 60 行))(已经在电报==0.0.1 中(来自 -r /tmp/build_996aa7e0/requirements.txt(第 47 行)) , 名称='电报')

There is the All logs:有所有日志:

Enumerating objects: 8, done.枚举对象:8,完成。

Counting objects: 100% (8/8), done.计数对象:100% (8/8),完成。

Delta compression using up to 8 threads使用多达 8 个线程的 Delta 压缩

Compressing objects: 100% (5/5), done.压缩对象:100% (5/5),完成。

Writing objects: 100% (8/8), 7.00 KiB |写入对象:100% (8/8),7.00 KiB | 716.00 KiB/s, done. 716.00 KiB/s,完成。

Total 8 (delta 0), reused 0 (delta 0), pack-reused 0总计 8(增量 0),重用 0(增量 0),打包重用 0

remote: Compressing source files... done.远程:压缩源文件...完成。

remote: Building source:远程:构建源:

remote: -----> Building on the Heroku-20 stack远程:-----> 在 Heroku-20 堆栈上构建

remote: -----> Using buildpack: heroku/python远程:-----> 使用 buildpack:heroku/python

remote: -----> Python app detected远程:-----> Python 应用检测到

remote: -----> Installing python-3.6.13远程:-----> 安装 python-3.6.13

remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2远程:-----> 安装 pip 20.1.1、setuptools 47.1.1 和 wheel 0.34.2

remote: -----> Installing SQLite3远程:-----> 安装 SQLite3

remote: -----> Installing requirements with pip远程:-----> pip 的安装要求

remote: ERROR: Double requirement given: telegram (from -r /tmp/build_996aa7e0/requirements.txt (line 60)) (already in telegram==0.0.1 (from -r /tmp/build_996aa7e0/requirements.txt (line 47)), name='telegram')远程:错误:给出双重要求:电报(来自-r /tmp/build_996aa7e0/requirements.txt(第60行))(已经在电报==0.0.1中(来自-r /tmp/build_996aa7e0/requirements.txt(第47行) )), name='电报')

remote: , Push rejected.远程:,推送被拒绝。 failed to compile Python app.无法编译 Python 应用程序。

remote: !偏僻的: ! Push failed推送失败

remote: : ## Warning - The same version of this code has already been built: 084ac888b168cf47da1ece8fd2b17b05e1d4df48 remote: : ## 警告 - 此代码的相同版本已经构建:084ac888b168cf47da1ece8fd2b17b05e1d4df48

remote: : We have detected that you have triggered a build from source code with version 084ac888b168cf47da1ece8fd2b17b05e1d4df48 remote. remote: :我们检测到您已从远程版本为 084ac888b168cf47da1ece8fd2b17b05e1d4df48 的源代码触发构建。 . . at least twice.至少两次。 One common cause of this behavior is attempting to deploy code from a different branch.这种行为的一个常见原因是试图从不同的分支部署代码。

remote: : If you are developing on a branch and deploying via git you must run: remote: : 如果你在一个分支上开发并通过 git 部署你必须运行:

remote: : git push heroku :main远程::git 推 heroku:主

remote: : This article goes into details on the behavior: remote: : 本文详细介绍了该行为:

remote: !偏僻的: ! https://devcenter.heroku.com/articles/duplicate-build-version https://devcenter.heroku.com/articles/duplicate-build-version

remote: Verifying deploy...远程:验证部署...

remote: .偏僻的: 。 Push rejected to zsk766.推送被拒绝到 zsk766。

remote: To https://git.heroku.com/zsk766.git远程:至https://git.heroku.com/zsk766.git

It looks like you've got telegram twice in your requirements.txt, once at line 60 and once at line 47.看起来您的 requirements.txt 中有两次telegram ,一次在第 60 行,一次在第 47 行。

Open requirements.txt , delete one of those lines, and repush your files.打开requirements.txt ,删除其中一行,然后重新推送您的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM