Often requirements show up in requirements.txt
like this:
django-registration
But in INSTALLED_APPS
it appears as re
PyCharm should be able to figure this out, but it doesn't. For now, I just add # noinspection PyPackageRequirements to each import with this warning to suppress it. I'd rather not, but it works for now.
JetBrains claims that this is fixed in version 2017.2:
https://youtrack.jetbrains.com/issue/PY-11963#comment=27-2248728
I can confirm this (in IntelliJ IDEA). Also, it's worth double-checking that the correct requirements file is specified in Settings -> Tools -> Python Integrated Tools -> Package requirements file
This seem to be an open issue
https://youtrack.jetbrains.com/issue/PY-11963
After seeing this phenomenon again, I did some more digging. After setting certain folders as source roots and restarting PyCharm, these reference warnings went away. I think this is a bug in PyCharm.