导入pptx库python时出错

2024-05-16 23:26:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我想导入pptx,但我正在使用这个

import sys

sys.path.insert(0,'D:/apera/python27/python-pptx-0.5.6')

import pptx

但不知怎的它显示出这样的错误

Traceback (most recent call last):
File "D:/apera/Workspace/Python scripting test 6/ppt.py", line 5, in <module>
import pptx
File "D:/apera/python27/python-pptx-0.5.6\pptx\__init__.py", line 15, in <module>
from pptx.api import Presentation  # noqa
File "D:/apera/python27/python-pptx-0.5.6\pptx\api.py", line 14, in <module>
from pptx.package import Package
File "D:/apera/python27/python-pptx-0.5.6\pptx\package.py", line 16, in <module>
from .parts.image import Image, ImagePart
 File "D:/apera/python27/python-pptx-0.5.6\pptx\parts\image.py", line 13, in <module>
 import Image as PIL_Image
ImportError: No module named Image

当我想安装PIL时,它不能安装64位。有不需要PIL的ppt库吗?


Tags: infrompyimageimportapipilsys