Hello,
I was playing around with LO on my Mac, particularly with the Python
interpreter and uno. Now I need a few more packages in that Python
environment, and it gets tricky. There is no virtual env installed,
when I attempt to create one, compiling modules fails because the build
tools differ between my system and LO’s Python.
For example:
$ /Applications/LibreOffice.app/Contents/Resources/python
Python 3.5.5 (default, Sep 11 2018, 01:20:06)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> pip.main(['install', 'regex'])
fails as well as
$ cd /Applications/LibreOffice.app/Contents/Resources
/Applications/LibreOffice.app/Contents/Resources > ./python -m venv .
/Applications/LibreOffice.app/Contents/Resources > ./bin/pip install regex
fails. Including LO’s path into PYTHONPATH like I would do on Linux
doesn’t work either:
>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/LibreOffice.app/Contents/Resources/uno.py", line 19, in <module>
import pyuno
ModuleNotFoundError: No module named 'pyuno'
What’s the recommended approach here?
Cheers,
Jens
--
Jens Tröger
http://savage.light-speed.de/
Context
- MacOS Python: how to install additional packages · Jens Tröger
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.