I am running Windows 7, Python 3.6 and LibreOffice 5.4.2.2 (installed in this order).
GOAL: install and use pyuno on Python 3.6 outside LibreOffice (standalone IDE, int his case: PyCharm 2017.2.3 Community Edition). I would like to be able to run the scripts operating on Calc sheets, just as I can on Excel using Pandas.
PROBLEM: when trying to execute script with "import uno" in the beginning, I get missing elements error:
File "C:\Users\Adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\uno\__init__.py", line 4, in <module>
from base import Element, Css, Payload, UnoBaseFeature, UnoBaseField
ImportError: cannot import name 'Element'
I could not install the 'Element' neither using pip nor pip3.6. I installed pyuno via pip3.6 install uno.
I tried installing using python3-uno:
C:\Users\Adam\AppData\Local\Programs\Python\Python36-32\Scripts>pip3.6 install python3-uno
Collecting python3-uno
Could not find a version that satisfies the requirement python3-uno (from versions: )
No matching distribution found for python3-uno
The same result is for pip3.6 (and pip) install python-uno.
I am guessing (or rather read on some other thread) and the init__.py file may be in conflict between my Pycharm/python 3.6 and Python 3.5, which comes with Libre Office but I do not know what to do about it.
If you know how to get this thing to work or where to obtain the missing Element, your support would be greatly appreciated.
PYTHONPATHandURE_BOOTSTRAPso that pyuno can find its own code and the corresponding LibreOffice installation. - moggiPATHin that answer you should setPYTHONPATH. - moggi