- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我安装了Pillow
,然后我想做的事:
from PIL import Image
我收到以下错误:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 61, in <module>
ImportError: cannot import name _imaging
但是,如果我分别导入这些,一切都很好,即:
import _imaging
import Image
你知道问题可能是什么吗?
最佳答案
我有同样的问题,我通过使用下面的命令升级这个包解决了这个问题:
pip install -U Pillow
关于python - 导入错误 : cannot import name _imaging,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25340698/
我正在尝试运行此代码: import pyautogui import time from PIL import _imaging from PIL import Image import pytes
我安装了Pillow,然后我想做的事: from PIL import Image 我收到以下错误: Traceback (most recent call last): File "", lin
我有一个单独执行时运行良好的 python 脚本,它使用来自 PIL 的 Image 模块。 但是当我尝试通过使用 python 嵌入来使用相同的脚本时,我得到了 运行时错误 R6034 然后在命令窗
我正在使用 virtualenv 在我的本地机器上运行 Python 2.7,一切都按预期工作。当我将“站点包”传输到我的生产服务器时,出现以下错误: PIL/_imaging.so: invalid
我已经阅读了类似问题的答案,但似乎都不适合我的情况。当尝试使用 Pillow 时,我收到此错误: >>> from PIL import Image Traceback (most recent ca
我目前正在尝试运行此 AWS Lambda 入门教程:https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-p
运行 from PIL import Image import pytesseract as pt text = pt.image_to_string(Image.open("text.png"))
我正在尝试使用 django/PIL/Imaging 生成一些 pdf,在我尝试将一些图像放入 pdf 之前一切都很好: Exception Type: ImportError Exception V
我安装了 PIL(Python 图像库)。 当我运行 Python 时: import PIL import Image import _imaging 我没有收到错误。但是,在运行我的应用程序时,它
root@syscomp1:~# cd Pillow-master root@syscomp1:~/Pillow-master# python3 selftest.py Traceback (most
我正在尝试创建使用 PIL 的 AWS Lambda 函数。因此我在我的项目目录中安装了 PIL pip install Pillow -t . 第一次在本地机器上运行,导致 ImportError:
哦,你好 我用 python 和 kivy 编写了应用程序。我用 buildozer 构建了它但在 Android 上它失败了: 03-26 23:10:25.857: E/art(24531): d
我已经在没有任何 virtualenv 的 Ubuntu - 14.0.0 中安装了 Pillow。但是当我尝试在我的 virtualenv 中再次安装它时,它失败并出现以下错误。 Readin
我已经为这个错误苦苦挣扎了两天,尝试了堆栈溢出的所有答案,但没有成功。我有一个使用 Django 图像字段的简单模型 class Author(models.Model): first_nam
我在使用 Windows 的家用电脑上运行我的测试站点。现在,我正在尝试缩略图,但出现错误: The _imaging C module is not installed 但仅当我尝试通过 Apach
PIL setup.py 构建的一些背景知识: -------------------------------------------------------------------- PIL 1.1
我用 Python 2 编写的代码在从 Python 运行时工作得很好,但是在我通过 PyInstaller 发送脚本并运行可执行文件后,它会输出: Traceback (most recent ca
我正在使用 Lambda-uploader编写 python lambda 代码并将 zip 移动到 AWS。我创建了一个包含我的 jar 文件和 zip 文件夹结构,如下所示。 我使用的代码来自 A
我过去在 OSX 上使用 Pillow 没有问题,但现在我收到以下错误。 File "/Library/Python/2.7/site-packages/PIL/Image.py", line 6
我得到错误: --------------------------------------------------------------------------- ImportError
我是一名优秀的程序员,十分优秀!