2017-10-07 94 views
0

我一直在嘗試將Django項目部署到Heroku。我遵循Python Crash Course的教程。當我進入混帳推Heroku的主人,我得到了以下的回答:Heroku部署問題 - Python版本

Counting objects: 73, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (65/65), done. 
Writing objects: 100% (73/73), 26.20 KiB | 0 bytes/s, done. 
Total 73 (delta 8), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Python app detected 
remote: !  The latest version of Python 3 is python-3.6.2 (you are using Python-2.7.12, which is unsupported). 
remote: !  We recommend upgrading by specifying the latest version (python-3.6.2). 
remote:  Learn More: https://devcenter.heroku.com/articles/python-runtimes 
remote: -----> Installing Python-2.7.12 
remote: !  Requested runtime (Python-2.7.12) is not available for this stack (heroku-16). 
remote: !  Aborting. More info: https://devcenter.heroku.com/articles/python-support 
remote: !  Push rejected, failed to compile Python app. 
remote: 
remote: !  Push failed 
remote: Verifying deploy... 
remote: 
remote: ! Push rejected to fathomless-scrubland-11916. 
remote: 

當我的Python --version CMD線返回2.7.14這是最先進的最新版本。我覺得這個錯誤告訴我需要使用Python3,但是他們的網站也說2.7.14也是支持的。我的runtime.txt指定了2.7.14。

回答

0

請嘗試runtime.txt 中的python-3.5.2,雖然它給它仍然有效

警告