Heroku在requirements.txt中找不到分布

2024-05-29 08:17:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图用Heroku部署我的第一个Python Telegram机器人,但当我这样做时,会出现两个错误:

ERROR: Could not find a version that satisfies the requirement pornhub-api==0.2.0
ERROR: No matching distribution found for pornhub-api==0.2.0

是不是不支持pornhub-api模块或者什么?我对Python非常陌生,所以如果我问了一些愚蠢的问题,很抱歉,但是我找不到任何可以帮助我的东西

requirements.txt文件如下所示:

telepot==12.7
pornhub-api==0.2.0

谢谢大家!

出现错误的所有过程:

Python app detected
Requirements file has been changed, clearing cached dependencies
Installing python-3.6.10
Installing pip
Installing SQLite3
Installing requirements with pip
   Collecting telepot==12.7
     Downloading telepot-12.7.tar.gz (73 kB)
   ERROR: Could not find a version that satisfies the requirement pornhub- 
 api==0.2.0 (from -r 
/tmp/build_"here the is written the build number"/requirements.txt (line 2)) (from 
versions: none)
   ERROR: No matching distribution found for pornhub-api==0.2.0 (from -r 
/tmp/build_"here the is written the build number"/requirements.txt (line 2))
!     Push rejected, failed to compile Python app.
!     Push failed

Tags: thefrombuildtxtapiversion错误not
1条回答
网友
1楼 · 发布于 2024-05-29 08:17:58

您似乎正在使用Python 3.6,而该库表示它需要3.7或更高版本:

Installing python-3.6.10

您应该能够request a newer runtime,方法是在存储库的根目录中添加一个名为runtime.txt的文件,其中包含所需的版本、提交并再次部署

目前,Heroku supports个Python版本

  • 3.8.3
  • 3.7.7
  • 3.6.10
  • 2.7.18

如果您想使用Python 3.8.3(如果可以,为什么不使用最新版本?),那么runtime.txt应该包含以下内容:

python-3.8.3

相关问题 更多 >

    热门问题