Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The behaviour you are seeing is an issue with pip itself: <a href="https://github.com/pypa/pip/issues/650" rel="nofollow">https://github.com/pypa/pip/issues/650</a></p> <p>It seems that pip uses distribute to upgrade distribute.</p> <p>However, what you need to do to fix your error is remove distribute from requirements.txt altogether. It's already there since it's being installed by the buildpack and there's no need to install it again using pip.</p> <p>I believe you actually CAN and ARE installing distribute on heroku's servers via the default buildpack. Heroku's Python support is implemented in the form of a buildpack. You can read more about buildpacks <a href="https://devcenter.heroku.com/articles/buildpacks" rel="nofollow">here</a>.</p> <p>If you wish to have a specific version of distribute, in this case one without the pip-bug, you have to replace it's source within the buildpack your app is using. It can be done like so:</p> <ol> <li>Get the original buildpack from heroku at <a href="https://github.com/heroku/heroku-buildpack-python" rel="nofollow">https://github.com/heroku/heroku-buildpack-python</a></li> <li>In your cloned buildpack (at the time of this writing) you will find <code>/vendor/distribute-0.6.36</code>. This is the problem. Replace it with <a href="https://pypi.python.org/pypi/distribute" rel="nofollow">a newer version of distribute</a>.</li> <li><p>Inside the buildpack's <code>bin/compile</code> script, replace the version of distribute the buildpack is using. In my case this was <a href="https://github.com/jhnwsk/heroku-buildpack-python/commit/f8369d400337eb88afa132eb7693ccbf9f81411f" rel="nofollow">replacing line 31</a> <code>DISTRIBUTE_VERSION="0.6.36"</code> with <code>DISTRIBUTE_VERSION="0.6.45"</code></p></li> <li><p>Upload your buildpack to github and tell heroku to use it by saying</p></li> </ol> <p><code>$ heroku config:set BUILDPACK_URL=https://github.com/you/name-of-buildpack-python-repo.git</code></p> <p><strong>ALTERNATIVELY</strong></p> <p>Tell heroku to use my custom buildpack instead of the original. My builbpack's only differences to the original are those described in steps 1-4. </p> <p>To override the buildpack for an existing application:</p> <p><code>$ heroku config:set BUILDPACK_URL=https://github.com/jhnwsk/heroku-buildpack-python.git</code></p> <p>Or if you are creating a new application</p> <p><code>$ heroku create myapp --buildpack https://github.com/jhnwsk/heroku-buildpack-python.git</code></p> <p>When you push your application to Heroku after making these changes you should see something like</p> <pre><code>-----&gt; Fetching custom git buildpack... done -----&gt; Python app detected -----&gt; No runtime.txt provided; assuming python-2.7.4. -----&gt; Preparing Python runtime (python-2.7.4) -----&gt; Installing Distribute (0.6.45) -----&gt; Installing Pip (1.3.1) </code></pre> <p>which means you have your custom distribute version running.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload