Scott Persinger
Scott Persinger

Reputation: 3564

How can I upgrade distribute package on Heroku?

I need to get distribute version 0.6.28 running on Heroku. I updated my requirements.txt, but that seems to have no effect.

I'm trying to install from a module from a tarball that required this later version of the distribute package.

During deploy I only get this:

     Running setup.py egg_info for package from http://downloads.sourceforge.net/project/mysql-python/mysql-python-test/1.2.4b4/MySQL-python-1.2.4b4.tar.gz
       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_ibj6h3in4vgp/.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,

Upvotes: 1

Views: 493

Answers (2)

skoczen
skoczen

Reputation: 1528

Ok, here's a solution that does work for the moment. Long-term fix I think is Heroku upgrading their version of distribute.

  1. Fork the python buildpack: https://github.com/heroku/heroku-buildpack-python/
  2. Add the requirements you need to the pack (I put them in bin/compile, just before the other pip install requirements step). See https://github.com/buildingenergy/heroku-buildpack-python/commit/12635e22aa3a3651f9bedb3b326e2cb4fd1d2a4b for that diff.
  3. Change the buildpack for your app:

    heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git

  4. Push again. It should work.

Upvotes: 2

CraigKerstiens
CraigKerstiens

Reputation: 5979

Try adding distribute with the specific version to your dependencies on a first push, then adding the required dependency.

cat requirements.txt
...
distribute==0.6.28
...
git push heroku master
...
cat requirements.txt
...
your deps here

Upvotes: -1

Related Questions