When I first played with Heroku, the runtime for python was 2.7.8, so I just wrote python-2.7.8 in runtime.txt. Recently, 2.7.9 can be used for python2.x series, so I would like to upgrade the heroku app to 2.7.9.
The python environment is managed using pyenv-virtualenv.
pyenv install 2.7.9 to put python-2.7.9 into pyenv management.
pip freeze> requirements.txtto save the packages managed by pip (must do for Heroku projects)
pyenv uninstall <name>
pyenv virtualenv 2.7.9 <name>
pip install -r requirements.txt
git commit`` git push heroku masterto upgrade Heroku
It's not particularly difficult, but you may be worried about a compile timeout in the case of a large package such as matplotlib.