Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find a suitable pyuno library and python binary combination in /usr/lib/libreoffice #290

Closed
nwalke opened this issue Sep 3, 2015 · 9 comments
Labels

Comments

@nwalke
Copy link

nwalke commented Sep 3, 2015

When trying to run unoconv --version, I get the following:

unoconv: Cannot find a suitable pyuno library and python binary combination in /usr/lib/libreoffice
ERROR: No module named uno

unoconv: Cannot find a suitable office installation on your system.
ERROR: Please locate your office installation and send your feedback to:
       http://github.com/dagwieers/unoconv/issues

If I go to /usr/lib/libreoffice, I see a program folder with pyuno.so inside. I'm unsure what to do from here.

This is on an Ubuntu 14.04 box using unoconv commit f5526cf6888a40069768b0c221df104c286b5cd8 and libreoffice 4.3.

Any help is appreciated

@pquentin
Copy link
Contributor

pquentin commented Sep 4, 2015

Yeah, the code that detects the various parts of LibreOffice needed for unoconv is a bit brittle. Also, the unoconv maintainer appears to be busy (I won't throw the first rock) so you won't get an easy fix here. Two questions:

  • Are you familiar with Python?
  • What does find /usr/lib/libreoffice -name python return?

Thanks!

@nwalke
Copy link
Author

nwalke commented Sep 4, 2015

I was actually able to fix this by changing the first line to #!/usr/bin/env python3 since I found uno.py under python 3.

@nwalke nwalke closed this as completed Sep 4, 2015
pquentin added a commit to pquentin/unoconv that referenced this issue Sep 5, 2015
According to unoconv#290, unoconv 0.7 is broken on Python 2 / Ubuntu 14.04 and the fix is to ask for Python 3. If you want to support Python 2, I can try to look into what's going on.
@dagwieers
Copy link
Member

The solution (as explained in the documentation) is to use the python binary that ships with LibreOffice.
There is no other good solution. However, unoconv should be able to find this python binary if it is in one of the known paths.

If the shebang needs to be changed on Ubuntu specifically, it is up to the distribution to ensure it works out of the box though.

@dagwieers
Copy link
Member

Also, the unoconv maintainer appears to be busy (I won't throw the first rock) so you won't get an easy fix here.

@pquentin We just released v0.7 in July, so your intel is outdated :-)

@nwalke
Copy link
Author

nwalke commented Sep 9, 2015

@dagwieers This is probably due to us wget'ing a certain commit version of unoconv, not through the distro.

@dagwieers
Copy link
Member

@nwalke I cannot find that commit version. Do you know whether it is old ? If so, could you please try a newer release, just to test if this is a regression that is already fixed, or a real bug.

@nwalke
Copy link
Author

nwalke commented Sep 10, 2015

I might be incorrect in stating that was a commit number... The URL we fetch unoconv with is this:
https://raw.githubusercontent.com/dagwieers/unoconv/f5526cf6888a40069768b0c221df104c286b5cd8/unoconv

@nwalke
Copy link
Author

nwalke commented Sep 10, 2015

Actually I was able to find that commit...

commit f5526cf6888a40069768b0c221df104c286b5cd8
Merge: d1b75ce 450edcf
Author: Dag Wieers <dag@wieers.com>
Date:   Wed Jul 8 09:21:40 2015 +0200

    Merge pull request #265 from pataquets/master

    Minor readme addition about HOME directory (#87)

@stb1337
Copy link

stb1337 commented May 23, 2016

I had the same problem. Modifing #!/usr/bin/env python to #!/usr/bin/env python3 in unoconv script fixed the problem.

..:/tmp# find / -name unoconv
/usr/bin/unoconv
...:/tmp# pico /usr/bin/unoconv
...:/tmp# unoconv --show
The following list of document formats are currently available:
bib - BibTeX [.bib]
doc - Microsoft Word 97/2000/XP [.doc]

louismrose added a commit to louismrose/unoconv that referenced this issue Jun 9, 2017
Ports fix to unoconv#290 to this fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants