0

I'm getting this error when attempting to build my Python / Flask app on Heroku (was deploying just fine a few days ago):

Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. You are using pip version 10.0.1, however version 18.0 is available.

I've tried to correct this by upgrading pip version, but it doesn't seem to stick. Every time the build is initiated, I see it's still loading pip version 10.

I have a requirements.txt as part of the app, but pip isn't listed in there.

RailsTweeter
  • 1,625
  • 3
  • 18
  • 33
  • `pip install --upgrade --force-reinstall -r requirements.txt` – hoefling Aug 18 '18 at 09:36
  • @hoefling So I ran heroku run pip install --upgrade pip --force-reinstall -r requirements.txt --app myappname and it says version 10 uninstalled successfully, and version 18 installed successfully. But then when I deploy my app, it is still using v 10 and says "You are using pip version 10.0.1, however version 18.0 is available." – RailsTweeter Aug 18 '18 at 18:13
  • 1. The error you had to fix is `Cannot uninstall 'certifi'`, which should now be fixed. 2. The pip version message is not an error, only an info. 3. You either have multiple Python versions and upgraded pip for one version, but deploying using other version. Or the pip upgrade did not run correctly. – hoefling Aug 18 '18 at 18:48
  • @hoefling any tips for further fixing this on heroku? i'm not sure of what else to do here. Thanks very much for your help. – RailsTweeter Aug 18 '18 at 20:44
  • An answer to [a related question on stackoverflow](https://stackoverflow.com/questions/49932759/pip-10-and-apt-how-to-avoid-cannot-uninstall-x-errors-for-distutils-packages) helped me – KolaB Jan 19 '21 at 16:28

0 Answers0