1

I've been trying to fix this error for about an hour now and I've ran out of solutions so please help me.

heroku create

runs fine no problems

git push heroku master

    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 git@heroku.com:[blocked].git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:[blocked].git'

requirements file:

 >Django==1.4.3
 >dj-database-url==0.2.1
 >psycopg2==2.4.6
 >virtualenv==1.8.4.post1

procfile

web: python manage.py runserver 0.0.0.0:$PORT --noreload

Heroku Logs:

    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 cannot find the requirement for `virtualenv==1.8.4.post1`. You either need to change that to `1.8.4` (the current version). Typically, however, `virtualenv` isn't put in the requirements at all - unless the functions of your app relies on it. – Dan Hoerst Jan 24 '13 at 02:34
  • I took it out of the requirements and got the same error. – EatPizzaRollsAndCode Jan 24 '13 at 02:51
  • Please post the file structure of your project, including your root folder and where your `.git` repo folder is located. – Dan Hoerst Jan 24 '13 at 02:55
  • Not sure if I'm doing this right but here it goes. Root: .git, hellodjango, venv, .gitignore, manage.py, Procfile.txt, requirements.txt. – EatPizzaRollsAndCode Jan 24 '13 at 03:00
  • Edit the original thread so that you can show the file and folder structure. Similar to this post (Just a random post with file structure for reference): http://stackoverflow.com/questions/12398460/django-app-file-structure – Dan Hoerst Jan 24 '13 at 03:02
  • Actually, to make it a lot easier I'll just give you the github link: https://github.com/catvalentine/hellodjango – EatPizzaRollsAndCode Jan 24 '13 at 03:03
  • Your file structure looks good. Can you run `heroku logs` from your project root and edit your original post with the log results. – Dan Hoerst Jan 24 '13 at 03:10
  • I was working with rails and I decided to try django to see which one I liked more. Could rails be interfering with django? – EatPizzaRollsAndCode Jan 24 '13 at 03:17
  • Added my answer. I'm assuming you did not `git add .` and `git commit` after removing the virtualenv from your requirements. – Dan Hoerst Jan 24 '13 at 03:24

3 Answers3

3

I was able to get this running by:

  1. cloning your git repo
  2. removing the virtualenv==1.8.4 from your requirements.txt
  3. git add .
  4. git commit -m "removing virtualenv requirement"
  5. git push heroku master

I'm assuming you did not git add . and git commit after removing the virtualenv from your requirements. Any changes you make to a git repo will not go in effect, for both github and heroku, until you add and then commit the changes locally, and finally push them to remote repository i.e. Github or Heroku.

Nabeel Ahmed
  • 18,328
  • 4
  • 58
  • 63
Dan Hoerst
  • 6,222
  • 2
  • 38
  • 51
1

The error message indicates that it can't find virtualenv==1.8.4.post1 and when I try that command locally, I get the same error. It doesn't look like that version exists at pypi. Try changing your requirements.txt to virtualenv==1.8.4?

Vinod Kurup
  • 2,676
  • 1
  • 23
  • 18
0

For the heroku deployment you do not need the virtualenv==1.8.4.post1 in the requirement.txt file, please remove that and place the procfile and requirements in the root of git.

Seenu S
  • 3,381
  • 6
  • 30
  • 45