2

Is it possible to use the pptx (Python-pptx) module for Python 3.5.1? Like for example:

from pptx import Presentation from pptx.util import Pt 

If not then what is the easyest way to replace this module? I think it shouldn't matter for the result but I am using PyCharm as IDE.

I have tried to install it with pip install python-pptx. Installing with pip worked just fine when I installed Pandas and matplotlib and other modules. But when I tried to install Python-pptx I got: ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n". Then I searched on google but instead only found that it is not possible because Python-pptx only supports python 3.4 or lower and now python 3.5 (what I saw of it)

This is why I started to wonder if there is perhaps a work-around to still make it work. And if not if there are other modules that work like Python-pptx so I won't have to change my whole code too much.

3
  • Does it not work for you? What have you tried? Commented May 17, 2016 at 14:48
  • I have tried to install it with pip install python-pptx. Installing with pip worked just fine when I installed Pandas and matplotlib and other modules. But when I try to install Python-pptx I get: ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n". Then I searched on google but instead only found that it is not possible (as far as I could see) Commented May 17, 2016 at 14:56
  • do you mean "not python 3.5"? I don't see any reason that the package wouldn't be installable, glancing at the source (though they haven't update the trove classifiers in their setup.py) Commented May 17, 2016 at 15:15

2 Answers 2

4

The differences between 3.4 and 3.5 are unlikely to break a package that is already capable of handling 2.7 and lower as well, the differences are not that big.

It sounds more like you don't have the correct binaries installed for lxml on which python-pptx is dependent. And since lxml is only available as wheel for python 3.2 your pip install tries to compile lxml from source.

From the message including \r\n I assume you are using Windows and for Python 3.5 there is no wheel for lxml on PyPI, so what you should try is install lxml from the unofficial builds from Christoph Gohlke in particular one of the last two, that have cp35 in the name, from the lxml section here (which one depends on your computer running 32 or 64 bit).

After that try to reinstall python-pptx

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

Comments

0

I don't know why I'm seeing this now but I can say one thing:

My package (md2pptx) uses Python-pptx and it requires 3.8 or later (for the "walrus operator").

So, 5 years and 3 months on :-) , Python-pptx works with very modern Python.

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.