1

i want to import pptx but i'm using this

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

but somehow it shows error like this

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 

and when i want to install PIL it can't install for 64 bit. Is there a ppt library that don't need PIL?

5
  • Is there a specific reason that your application can't run as a 32-bit? I think that might be the easiest solution. Commented Jan 19, 2015 at 4:26
  • PIL in main website don't have the install for 64-bit. I think i''l try with VM for 32 bit one Commented Jan 19, 2015 at 4:29
  • Is there a reason you don't want to use pip to install it? Installs fine for me in a 64-bit windows 2.7 virtualenv. pip install python-pptx. Oh... and Pillow replaced PIL. Commented Jan 19, 2015 at 4:44
  • you're right used pillow! Commented Jan 19, 2015 at 4:49
  • 1
    Install Pillow from here. Download the .whl, then run pip install wheelfilename.whl Commented Jan 19, 2015 at 4:49

4 Answers 4

1

remove the PIL package due to conflicts with Pillow and python-pptx

  • Delete the PIL directory located in C:\Users\user1\AppData\Local\Continuum\Anaconda\Lib\site-packages\ or wherever your library is

  • run pip install python-pptx to install Pillow

Sign up to request clarification or add additional context in comments.

Comments

0

I had about the same issue. When I updated the pillow library (pretty easy to do with Anaconda which I use) the issue was gone.

Comments

0
  1. Uninstall Pillow

  2. Uninstall python-pptx

  3. Install Pillow

  4. Install python-pptx

Run above commands using "pip". This worked for me.

Comments

0

I had the same problem. My system is Windows XP 32bit and the python version is 2.7.13. I just degraded the version of pillow and python-pptx. It worked for me

pip install pillow==3.1.0 pip install python-pptx==0.5.5 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.