简体   繁体   English

Heroku使用heroku / python构建包“无法编译”,没有运行pip的迹象

[英]Heroku “failed to compile” with heroku/python build pack, with no signs of pip running

I am developing a Python app using aiohttp and redis to run in Heroku. 我正在开发使用aiohttpredis在Heroku中运行的Python应用程序。 It is deployed to Heroku via GitHub. 它通过GitHub部署到Heroku。 Although there is no problem running the app locally, it fails to build in Heroku with the following error. 尽管在本地运行该应用程序没有问题,但由于以下错误,它无法在Heroku中构建。

-----> Using set buildpack heroku/python
-----> Python app detected
-----> Installing python-3.5.2
 !     Requested runtime (python-3.5.2
 !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
 !     Push rejected, failed to compile Python app

Since the build is aborted before pip even has a chance to run, I'm not quite sure what has gone wrong. 由于构建在pip甚至没有机会运行之前就已中止,因此我不太确定出了什么问题。 runtime.txt is copied off from a separate Heroku app which builds fine, and I can't find any problems in my requirements.txt . runtime.txt是从单独的Heroku应用程序复制而来的,该应用程序运行良好,我在我的requirements.txt找不到任何问题。

My requirements.txt is: 我的requirements.txt是:

aiohttp==0.21.6
redis==2.10.5

My runtime.txt is: 我的runtime.txt是:

python-3.5.2

Ok. 好。 So I had the same issue as you did. 因此,我遇到了与您相同的问题。 If you look closely you see: 如果仔细观察,您会看到:

Requested runtime (python-3.5.2

Notice the "(". Probably has something to do with the encoding of the file. In Ubuntu I used dos2unix (apt-get install dos2unix && dos2unix runtime.txt) which solved this issue. Alternatively you could probably adjust settings in your favorite text editor / IDE. Atleast you'll know where to look. 注意“(”。可能与文件的编码有关。在Ubuntu中,我使用了dos2unix(apt-get install dos2unix && dos2unix runtime.txt)解决了这个问题。或者,您可以调整自己喜欢的文本中的设置编辑器/ IDE。至少,您会知道在哪里看。

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

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