首页 > 解决方案 > Python import Pillow/PIL 错误,不能 ImportError: cannot import name '_imaging'

问题描述

我已经尝试了一切,将文件添加到我的实际项目中,安装和重新安装 PILLOW。现在实际的 PIL 文件在我的项目文件夹中,我目前有错误:

文件“C:\Users\crowl\Desktop\py project\PIL\Image.py”,第 69 行,来自 . import _imaging as core ImportError: cannot import name '_imaging' from 'PIL' (C:\Users\crowl\Desktop\py project\PIL__init__.py)

我尝试从 PIL 导入 * 导入图像,从 PIL.Image 导入核心作为 _imaging 并且当前使用从 PIL 导入图像。我设法让它在另一台 PC 上工作,只需使用 PIL 文件夹和所有源代码,因为它是一个学校项目,现在我在家,它似乎不起作用。

感谢所有的帮助。

标签: pythonpython-imaging-library

解决方案


推荐阅读