Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Updated 2013-09-30:</strong> the current way to clear the virtualenv seems to specify a different python runtime version in <code>runtime.txt</code> <a href="https://github.com/heroku/heroku-buildpack-python/issues/72" rel="nofollow noreferrer">as stated on Github</a> and in the <a href="https://devcenter.heroku.com/articles/python-runtimes#changing-runtimes" rel="nofollow noreferrer">Heroku's devcenter reference</a>.</p> <p>Be aware that Heroku currently "only endorses and supports the use of Python 2.7.4 and 3.3.2" so unless your application supports both Python 2.7.4 and 3.3.2, you may want to test it with the runtime you'll want to switch to (currently available at <code>http://envy-versions.s3.amazonaws.com/$PYTHON_VERSION.tar.bz2</code>, though it shouldn't be an issue to switch e.g. between 2.7.4 and 2.7.3 in most cases).</p> <p>Thanks @Jesse for your up-to-date <a href="https://stackoverflow.com/a/15087542/343834">answer</a> and to the commenters who made me aware of the issue.</p> <hr> <p><strong>Was up-to-date in ~november 2012</strong> (I haven't since updated the linked buildpack, my pull request was closed and the CLEAN_VIRTUALENV feature was dropped at some point by the official buildpack):</p> <p>As David explained, you cannot pip uninstall one package but you can purge and reinstall the whole virtualenv. Use the <a href="https://devcenter.heroku.com/articles/labs-user-env-compile" rel="nofollow noreferrer">user-env-compile</a> lab feature with the <a href="https://github.com/heroku/heroku-buildpack-python/pull/47" rel="nofollow noreferrer">CLEAN_VIRTUALENV option</a> to purge the virtualenv:</p> <pre><code>heroku labs:enable user-env-compile heroku config:add CLEAN_VIRTUALENV=true </code></pre> <p>Currently this won't work because there is a bug. You'll need to use <a href="https://github.com/blaze33/heroku-buildpack-python" rel="nofollow noreferrer">my fork</a> of the buildpack until this <a href="https://github.com/heroku/heroku-buildpack-python/pull/51" rel="nofollow noreferrer">get fixed upstream</a> (pull request was closed) :</p> <pre><code>heroku config:add BUILDPACK_URL=https://github.com/blaze33/heroku-buildpack-python.git </code></pre> <p>Now push your new code and you'll notice that the whole virtualenv gets reinstalled.</p> <p>Andrey's answer no longer works since March 23 2012. The <a href="https://github.com/heroku/heroku-buildpack-python/commit/6aadf1683a2e2a3f9cca1ea90cf74bf809214328" rel="nofollow noreferrer">new style virtualenv</a> commit moved the virtual env from /app to /app/.heroku/venv but the purge branch wasn't updated to catch up so that you end up with a virtualenv not being in PYTHONHOME.</p> <p>To avoid reinstalling everything after each push, disable the option:</p> <pre><code>heroku labs:disable user-env-compile heroku config:remove CLEAN_VIRTUALENV BUILDPACK_URL </code></pre>
    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. 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