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

懵懂的女人 提交于 2020-01-06 04:44:05

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/52621583/pycharm-site-packages-folder-marked-red-and-modules-cannot-be-imported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!