使用python pptx开始演示

使用python pptx开始演示,python,powerpoint,Python,Powerpoint,我有一些python代码可以用LibreOffice打开.pptx-文件: from pptx import Presentation prs = Presentation('tes.pptx') 如果在Raspbian上运行此代码,则会收到以下错误消息: File "bukappt.pt", line 1, in <module> from pptx import Presentation File "/usr/local/lib/python2.7/dist-package

我有一些python代码可以用LibreOffice打开
.pptx
-文件:

from pptx import Presentation

prs = Presentation('tes.pptx')
如果在Raspbian上运行此代码,则会收到以下错误消息:

File "bukappt.pt", line 1, in <module>
 from pptx import Presentation
File "/usr/local/lib/python2.7/dist-packages/pptx/_init_.py", line 15, in <module>
 from pptx.api import Presentation # noqa
File "/user/local/lib/python2.7/dist-packages/pptx/api.py", line 14, in <module>
 from ppx.package import Package
File "/usr/local/lib/python2.7/dist-packages/pptx/parts/image.py", line 13, in <module>
  import Image as PIL_Image
ImportError: No modulenamed Image
文件“bukappt.pt”,第1行,在
从pptx导入演示文稿
文件“/usr/local/lib/python2.7/dist-packages/pptx/_init_uu.py”,第15行,在
来自pptx.api导入演示文稿#noqa
文件“/user/local/lib/python2.7/dist-packages/pptx/api.py”,第14行,在
从ppx.package导入包
文件“/usr/local/lib/python2.7/dist packages/pptx/parts/image.py”,第13行,在
将图像导入为PIL_图像
ImportError:没有模块化的图像

如何修复此问题?

这是由于未安装枕头图像库造成的。要让它工作,你需要安装枕头