Pigar uses underscores instead of hyphens
rusmux opened this issue · comments
Ruslan Mukhametshin commented
For packages with hyphens in their names, pigar uses underscores instead of hyphens. This way pip and conda do not recognize these packages and cannot find them.
olixy commented
I believe python stores modules in this way (with underscores in the site-packages folder). But in my case pip has no issue installing packages with underscores instead of hyphens.
Possible solution could be to just replace the underscores to normalize names as described in PEP503.
re.sub(r"[-_.]+", "-", name).lower()