Avoid error in pip uninstall

Closes #14295