How do I uninstall, clean or flush virtualenv on Heroku?

I have a Heroku Python project that emits errors that I cannot reproduce locally. I suspect the Python virtualenv in the Heroku deployment is corrupted in some way.

Is there a way to clear the Python virtual file in Heroku project and start fresh?

+3


source to share


1 answer


See Heroku docs . Create a runtime.txt file with a different Python version than your current version and click on hero. This will clear the app build cache and virtualenv. Then you can go back to your previous version of Python in runtime.txt and push it to Heroku, giving you both your desired Python runtime and a clean virtualenv.



+1


source







All Articles