Reputation: 732
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.
Upvotes: 2
Views: 2283
Reputation: 763
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.
Upvotes: 0
Reputation: 76599
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
Upvotes: 4