[英]"Can't import the Python Imaging Library"
I have downloaded the uniconvertor
to convert from cdr
to svg
on Debian 10 (which has no more this package, so I have to download from source).我已经在 Debian 10 上下载了
uniconvertor
将cdr
转换为svg
(没有更多这个 package,所以我必须从源下载)。 Now when trying to execute:现在尝试执行时:
$uniconv image.cdr image.svg
, I got this: $uniconv image.cdr image.svg
,我得到了这个:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/uniconvertor/__init__.py", line 64, in <module>
from app.io import load
File "/usr/local/lib/python2.7/dist-packages/uniconvertor/app/__init__.py", line 62, in <module>
from conf.configurator import Configurator
File "/usr/local/lib/python2.7/dist-packages/uniconvertor/app/conf/configurator.py", line 11, in <module>
frm app.events import connector
File "/usr/local/lib/python2.7/dist-packages/uniconvertor/app/__init__.py", line 114, in <module>
_import_PIL()
File "/usr/local/lib/python2.7/dist-packages/uniconvertor/app/__init__.py", line 103, in _import_PIL
warn.warn(warn.USER, "Can't import the Python Imaging Library")
NameError: global name 'warn' is not defined
Seems I have not "Imaging Library" and get error NameError: global name 'warn' is not defined
, does it mean the function warn
is not defined in that script?似乎我没有“成像库”并收到错误
NameError: global name 'warn' is not defined
,这是否意味着该脚本中未定义 function warn
?
It seems your app needs Python PIL
library to work but you don't have it installed.您的应用似乎需要 Python
PIL
库才能工作,但您没有安装它。 Try installing it https://pypi.org/project/Pillow/ .尝试安装它https://pypi.org/project/Pillow/ 。
You'll have to follow two steps.您必须执行两个步骤。
import warnings
in your python file在 python 文件中
import warnings
Install pillow, PIL is Dead.安装枕头,PIL 已死。 Use Pillow
pip install Pillow
.使用 Pillow
pip install Pillow
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.