In my case, the use of the pre-existing virtualenv did not work in the editor - all modules were marked as unresolved links (a natural start works, since this happens outside the editor’s configuration, an external process is simply executed (it’s not so easy to debug)).
Turns out PyCharm didn't add the site-packages directory ... the fix is to add it manually.
Open File → Settings → Project Interpreter, select "Show All ..." (to edit the configuration) (1), select your interpreter (2) and click "Show Paths of the Selected Translator" (3).
On this screen, manually add the "site-packages" directory of the virtual environment (4) (I also added that "Lib", for good measure); After everything is done and saved, they will appear in the paths of the interpreter.

Another that would do well is to select “Link this virtual environment to the current project” in the interpreter editing field.
source share