简体   繁体   中英

Can't push to heroku, distribute (>=0.6.28) is not available

When attempting to push a flask-mysql python app. Is there anyway to conditionally tell the flask-mysql extension to use distribute >= 0.6.28? I included it in the requirements file and it installs, but still no dice when I hit the flask-mysql line inside of requirements.txt, it still tries to go for 0.6.27.

Downloading/unpacking MySQL-python (from Flask-MySQL==1.2->-r requirements.txt (line 3))
         Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4c1.zip
         Running setup.py egg_info for package MySQL-python
           The required version of distribute (>=0.6.28) is not available,
           and can't be installed while this script is running. Please
           install a more recent version first, using
           'easy_install -U distribute'.

           (Currently using distribute 0.6.27 (/tmp/build_1w0z6sg73qbm/.heroku/venv/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg))
           Complete output from command python setup.py egg_info:
           The required version of distribute (>=0.6.28) is not available,

       and can't be installed while this script is running. Please

       install a more recent version first, using

       'easy_install -U distribute'.



       (Currently using distribute 0.6.27 (/tmp/build_1w0z6sg73qbm/.heroku/venv/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg))

       ----------------------------------------
       Command python setup.py egg_info failed with error code 2 in /tmp/build_1w0z6sg73qbm/.heroku/venv/build/MySQL-python
       Storing complete log in /app/.pip/pip.log
 !     Heroku push rejected, failed to compile Python app

I was having the same issue, I ran:

easy_install -U distribute

This upgraded distribute and then it installed OK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM