2013-01-24 6 views
1

약 1 시간 동안이 오류를 해결하려고 노력했지만 해결책이 없어서 도와주세요.Heroku에 Django 프로젝트를 푸시하는 중 오류가 발생했습니다.

:

Heroku가 아무런 문제

자식 푸시 Heroku가 마스터

Counting objects: 119, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (118/118), done. 
Writing objects: 100% (119/119), 1.39 MiB | 66 KiB/s, done. 
Total 119 (delta 4), reused 0 (delta 0) 
-----> Python app detected 
-----> No runtime.txt provided; assuming python-2.7.3. 
-----> Preparing Python runtime (python-2.7.3) 
-----> Installing Distribute (0.6.34) 
-----> Installing Pip (1.2.1) 
-----> Installing dependencies using Pip (1.2.1) 
     Downloading/unpacking Django==1.4.3 (from -r requirements.txt (line 1)) 
     Running setup.py egg_info for package Django 

     Downloading/unpacking dj-database-url==0.2.1 (from -r requirements.txt (line 2)) 
     Downloading dj-database-url-0.2.1.tar.gz 
     Running setup.py egg_info for package dj-database-url 

     Downloading/unpacking psycopg2==2.4.6 (from -r requirements.txt (line 3)) 
     Running setup.py egg_info for package psycopg2 

      no previously-included directories found matching 'doc/src/_build' 
     Downloading/unpacking virtualenv==1.8.4.post1 (from -r requirements.txt (line  4)) 
     Could not find a version that satisfies the requirement virtualenv==1.8.4.post1 (from -r requirements.txt (line 4)) (from versions:) 
     No distributions matching the version for virtualenv==1.8.4.post1 (from -r requirements.txt (line 4)) 
     Storing complete log in /app/.pip/pip.log 
!  Heroku push rejected, failed to compile Python app 

To [email protected]:[blocked].git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:[blocked].git' 

요구 사항 파일 잘

실행을 만들

procfile

웹 : 파이썬 manage.py의 runserver 0.0.0.0:$PORT --noreload

Heroku가 로그 :

The 'heroku' gem has been deprecated and replaced with the Heroku Toolbelt, download and install from https://toolbelt.heroku.com. 

2013-01-24T01:22:06+00:00 heroku[api]: Enable Logplex by [private email]@yahoo.com 
2013-01-24T01:22:06+00:00 heroku[api]: Release v2 created by [private email]@yahoo.com 
2013-01-24T01:22:42+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T01:23:38+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T01:43:26+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T01:43:51+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T02:27:36+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T02:28:08+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T02:32:08+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T02:32:32+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T02:43:32+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T02:43:59+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T02:46:23+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T02:46:52+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
2013-01-24T02:49:48+00:00 heroku[slugc]: Slug compilation started 
2013-01-24T02:50:26+00:00 heroku[slugc]: Slug compilation failed: failed to compile Python app 
+1

Pip가'virtualenv == 1.8.4.post1'에 대한 요구 사항을 찾을 수 없습니다. 당신은 그것을'1.8.4' (현재 버전)로 변경할 필요가 있습니다. 그러나 일반적으로'virtualenv'는 앱의 기능이 의존하지 않는 한 전혀 요구 사항에 포함되지 않습니다. –

+0

나는 요구 사항을 꺼내서 같은 오류가 발생했습니다. – EatPizzaRollsAndCode

+0

루트 폴더와'.git' repo 폴더가있는 곳을 포함하여 프로젝트의 파일 구조를 게시하십시오. –

답변

3

나는하여 실행을 얻을 수 있었다

요구 사항에서 virtualenv를 제거한 후에 git add .git commit을 사용하지 않았다고 가정합니다. 당신이 git의 repo에 대한 변경은 즉 Github에서 또는 Heroku가 원격 저장소에 마지막으로 push에게이를 로컬 때까지 add 다음 commit 변경, githubheroku 모두, 효과에 가서하지 않습니다.

+0

나를 도와 주셔서 감사합니다. 그런 내 부주의 한 실수. – EatPizzaRollsAndCode

+0

Np. 이제 코드를 추가하고 즐기십시오! 장고는 재미 있습니다. –

1

오류 메시지가 할 수있는 것을 나타냅니다 virtualenv==1.8.4.post1을 찾아 로컬에서 해당 명령을 시도하면 동일한 오류가 발생합니다. 그 버전이 pypi에있는 것처럼 보이지 않습니다. requirements.txt를 virtualenv==1.8.4으로 변경해보십시오.

  1. requirements.txt
  2. git add .
  3. git commit -m "removing virtualenv requirement"
  4. git push heroku master
에서
  • virtualenv==1.8.4을 제거하여 자식의 repo를 복제 :
  • +0

    나는 그것을 바꿨고 나는 여전히 같은 오류를 얻고있다. – EatPizzaRollsAndCode

    0

    heroku 배포의 경우 requirement.txt 파일에 virtualenv == 1.8.4.post1이 필요하지 않으므로이를 제거하고 procfile 및 요구 사항을 git 루트에 배치하십시오.

    관련 문제