Closed robvdl closed 8 months ago
That’s a bug in pycharm as both names are valid. You should open a ticket with them to normalize package names when doing any dependency resolution. The algorithm is defined in pep 503. https://peps.python.org/pep-0503/#normalized-names https://packaging.python.org/en/latest/specifications/name-normalization/
Thanks for that link, that bug has been going on for years and years and normally I'll just rename the packages in my setup.py or requirements.txt whatever. I'll see if I can get them to finally fix it.
I'm closing this as it is a PyCharm issue and I'm also seeing mixed behaviour there.
The scaffold lists some dependencies in setup.py with an underscore for example pyramid_jinja2 because that is what the project is called. However in pypi it's actually stored as pyramid-jinja2 with a hyphen.
This constantly triggers PyCharm saying "pyramid_jinja2 is not installed" so it could also be seen as a PyCharm bug, because pyramid-jinja2 with a hyphen is installed.
But it's easy enough to fix it in the project template by using the package name exactly as it is listed in pypi.
https://pypi.org/project/pyramid-jinja2/