1

I am new to both python and heroku. Can you please help me solve issue regarding heroku build with python requirement ?

I have seen this error when ever pip tries to install from a "tar.gz" file.

-----> Python app detected
-----> Installing pip
-----> Installing requirements with pip
       Collecting Flask-Login (from -r /tmp/build_f4f549a18e5f1258bbac763cc70b38dd/requirements.txt (line 13))
         Downloading Flask-Login-0.4.1.tar.gz
           Complete output from command python setup.py egg_info:
           /app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
             warnings.warn(msg)
           /app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
             warnings.warn(msg)
           usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
              or: -c --help [cmd1 cmd2 ...]
              or: -c --help-commands
              or: -c cmd --help

           error: invalid command 'egg_info'

           ----------------------------------------
       Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-NrbKpY/Flask-Login/
 !     Push rejected, failed to compile Python app.
 !     Push failed
Dileepa
  • 1,019
  • 1
  • 15
  • 40
  • Check out [this](https://stackoverflow.com/questions/11425106/python-pip-install-fails-invalid-command-egg-info#11425830) question. – korefn Mar 20 '18 at 10:51
  • You are right. `pip --version pip 9.0.2 from /app/.heroku/python/lib/python2.7/site-packages (python 2.7)`. But each time I deploy, pip version resets to 9.0.2 even if I had upgraded to latest from `heroku run bash` – Dileepa Mar 20 '18 at 11:12
  • Are you using a container? – korefn Mar 20 '18 at 15:14

1 Answers1

0

Used python-3.6.4 in runtime.txt everything started working.

Dileepa
  • 1,019
  • 1
  • 15
  • 40