Search code examples
pythonpython-3.xmodulepycharmpython-import

Pycharm site-packages folder marked red and modules cannot be imported


I have installed some files (pygame, python-docx) through pip. They appear in pycharm in the site-packages folder, but I cannot import anything from that folder. I get a ModuleNotFoundError. The site-packages folder and sub-folders all appear as red.

Any ideas what I should do?

I have python 3.7 and pycharm community edition 2018.2.3


Solution

  • Try to check if your current project interpreter is correct: you should see the path to your python environment where all packages are installed as shown in the picture.

    python interpreter path