Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On Thu, Feb 19, 2015 at 05:45:58AM +0100, Jens Tröger wrote:
What is the proper and recommended way of building a Python virtual
environment around the LO Python?  I'd like to ensure that uno is
available and functioning, while at the same time I can install
additional packages into the venv?

I've tried the following on my Mac, without much success:

  > /Applications/LibreOffice64.app/Contents/MacOS/python -m venv test-venv

This does create a virtual env, but there is still no UNO available, and
I had to extend PYTHONPATH

  (test-venv) > PYTHONPATH=$PYTHONPATH:/Applications/LibreOffice64.app/Contents/MacOS ./bin/python

Following the instructions on this site

  
http://askubuntu.com/questions/488529/pyvenv-3-4-error-returned-non-zero-exit-status-1/488530#488530

I downloaded the setuptools and pip for the virtual env.  However, I was
unable to locate matching version numbers: LO Python is 3.3.5 but I had
to work with 3.4.4 of the tools.  (Does that make a difference?)

However, when it came to installing packages, the venv falls apart.
Take lxml for example, which compiles some of its components natively.
It seems here that the build environment of LO is hard-wired into
Python, and of course that is a different one than mine: the log is
attached.

This is on my Mac which does have a Python interpreter built with LO.
On Linux, as far as I can tell, all I can do is extend my PYTHONPATH to
LO.

Cheers,
Jens

-- 
Jens Tröger
http://savage.light-speed.de/

Context


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.