Pip will "normalize" names.

The rules appear to be 'if there's a non-alphabetic, non-numeric,
non-period (.) in this packages name, then replace that character with
a "-" and print that name when running pip freeze or pip list'.

Since the name is altered, we need to normalize that name in a manner
consistent with pip, and compare that normalized name to the output of
pip freeze.

Once that's done, upgrade seems to work.