Avoid error in pip uninstall

Closes #14295
Merge pull request #14373 from cachedout/14295

Avoid error in pip uninstall