2017-05-06 84 views
2

我有令人不安的構建包但它沒有工作,我確實有requirements.txt和procfile以及虛擬環境。我想在heroku上部署我的第一個django應用程序,並且獲得了預接收鉤子的錯誤拒絕

(deploy) C:\Users\Samar\Desktop\deploy\blog>git push heroku master 
Counting objects: 127, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (122/122), done. 
Writing objects: 100% (127/127), 45.25 KiB | 0 bytes/s, done. 
Total 127 (delta 47), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Python app detected 
remote: -----> Installing Python 3.6.0 
remote: -----> Installing pip 
remote: -----> Installing requirements with pip remote:/app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/pip-install: line 5: /app/.heroku/python/bin/pip: No such file or directory 
remote: !  Push rejected, failed to compile Python app. 
remote: 
remote: !  Push failed 
remote: Verifying deploy... 
remote: 
remote: !  Push rejected to trueblog. 
remote:To https://git.heroku.com/trueblog.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/trueblog.git' 

回答

0

我在使用python 3.5.1時遇到了同樣的問題,但是當我升級到python 3.6.1時,一切正常。

創建一個runtime.txt文件並將其添加到python-3.6.1,並將其放置到您的manage.py文件所在的基本目錄中。這應該可以解決你的問題。

相關問題