Kiddo
Kiddo

Reputation: 1980

Flask - Failed to deploy an app because Pip fails

I have deployed couple apps on heroku for education purpose already. Today I have created a new app using flask, I follow instruction on heroku website as before. Problem happens at the step that I need to use pip to install other thing

(venv)kiddo@kiddo-LIFEBOOK-LH531:~/Documents/Projects/workspace/hellowork$ pip install Flask gunicorn
Downloading/unpacking Flask
  Downloading Flask-0.10.1.tar.gz (544Kb): 544Kb downloaded
  Running setup.py egg_info for package Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git' ...

..... and it goes on with others. From this now on, i cannot deploy on heroku as it always pops out the additional error along with the above:

Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1395994594.37

   Patched done.

   Relaunching...

   Traceback (most recent call last):

     File "<string>", line 1, in <module>

   NameError: name 'install' is not defined

   ----------------------------------------
   Cleaning up...
   Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u56661/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-y13sLM-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u56661/distribute
   Storing debug log for failure in /app/.pip/pip.log

 !     Push rejected, failed to compile Python app

To [email protected]:quiet-meadow-5679.git

My requirement.txt:

Flask==0.10.1
Jinja2==2.7.2
MarkupSafe==0.19
Werkzeug==0.9.4
argparse==1.2.1
distribute==0.6.24
gunicorn==18.0
itsdangerous==0.23
wsgiref==0.1.2

I'm using ubuntu, every package is up to date. I have never had this problem before and I have spent couple hours on it already. Any ideas how to fix it would be appreciated.

App is running fine on localhost with foreman btw.

Thank you

Upvotes: 1

Views: 646

Answers (2)

Kiddo
Kiddo

Reputation: 1980

I contacted heroku support and it's the problem between my local packages and heruku server's packages. How to fix it is just to remove distribute==0.6.24 from the requirements.txt

They also updated the instruction page so we need to update to the latest version of every packages in order to deploy the app.

Upvotes: 1

rdegges
rdegges

Reputation: 33824

Have you tried messaging Heroku support about this? It looks like Heroku might have been having an API issue when this happened. You should contact support (and try to deploy again).

Upvotes: 0

Related Questions