Pycharm site-packages folder marked red and modules cannot be imported(Pycharm site-packages 文件夹标记为红色,模块无法导入)
问题描述
我已经通过 pip
安装了一些文件(pygame
、python-docx
).它们出现在 site-packages
文件夹中的 pycharm
中,但我无法从该文件夹中导入任何内容.我得到一个 ModuleNotFoundError
.site-packages 文件夹和子文件夹都显示为红色.
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?
我有 python 3.7
和 pycharm community edition 2018.2.3
推荐答案
尝试检查您当前的项目解释器是否正确:您应该看到安装所有包的python环境的路径如图所示.
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 解释器路径
这篇关于Pycharm site-packages 文件夹标记为红色,模块无法导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Pycharm site-packages 文件夹标记为红色,模块无法导


基础教程推荐
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 包装空间模型 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01