我想导入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库?
发布于 2015-03-05 23:31:33
删除与Pillow和python-pptx冲突的PIL包
Pillow Pillow删除位于C:\Users\user1\AppData\Local\Continuum\Anaconda\Lib\site-packages\或您的库所在位置的目录
pip install python-pptx安装Pillow发布于 2018-07-24 16:32:00
我也遇到过同样的问题。当我更新了pillow库(我使用的Anaconda很容易做到),这个问题就消失了。
发布于 2019-09-17 13:09:23
python枕头卸载Pillow
使用"pip“运行上面的命令。这对我很有效。
https://stackoverflow.com/questions/28017942
复制相似问题