2

I want to create a spreadsheet in LibreOffice, upload it to my webserver, and use use my django app and python uno bridge to open the spreadsheet, fill the some cells in with data, hit the recalculate button, and pull out the results from other cells using an Ubuntu 18 webserver, libreoffice 6.2, and python 3.5.

I've installed LibreOffice and ran sudo apt-get install libreoffice-script-provider-python.

I created a venv with python 3.5.7 virtualenv --system-site-packages /venv and attempted to start python on the console and test by running import uno which results in the following error message:

>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'uno'

I also tried the commands below to no avail:

sudo apt-get install libreoffice python-genshi python-cairo python-lxml python-setuptools 
sudo apt-get install libreoffice-script-provider-python
easy_install uno

which produces the following error:

>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sysadmin/venv/cork2/lib/python3.5/site-packages/uno-0.3.3-py3.5.egg/uno/__init__.py", line 4, in <module>
    from base import Element, Css, Payload, UnoBaseFeature, UnoBaseField
ImportError: No module named 'base'

How can I create a virtual environment (not linked to the LibreOffice distribution) that I can import uno into?

1 Answer 1

0

I could solve this riddle, just to produce the next one.

    easy_install base 

this hopped on to the next issue:

    ImportError: cannot import name 'Element'

Maybe this has something to do with some other 'uno'package as suggested here: https://github.com/unoconv/unoconv/issues/454

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .