I have been looking to convert a .pptx file to a .pdf file through a Python script for several hours but nothing seems to be working.
What I have tried:
unoconv is a great tool to perform this task and it is indeed build in python. Regarding your problem, it might be related to a recurring problem with the way the python interpreter is set in the main unoconv file after it has been installed.
To run it with python3 interpreter, replace #!/usr/bin/env python
with #!/usr/bin/env python3
or #!/usr/bin/python3
in unoconv file (/usr/bin/unoconv
).
one liner:
sudo sed -i -e '1s:#!/usr/bin/env python$:#!/usr/bin/env python3:' /usr/bin/unoconv
You could also symlink /usr/bin/unoconv
to /usr/local/bin/unoconv
.