Wednesday, July 30, 2014

Overwriting module with same version in Heroku - Python

I needed to install a newer version of a module from a github commit, but it had the same version number. Heroku just used the cached version of the module and didn't overwrite it with the newer version.

The easiest fix for this:

  1. Create a file in your application's root directory called "runtime.txt" with only "python-3.4.1" written inside.
  2. Add, commit, and push the new runtime.txt
  3. Change runtime.txt back to "python-2.7.6"
  4. Add, commit, and push to clear your virtualenv and reinstall all modules