PIP in LibreOffice 2025.8 May break many things including numpy and Pandas I am the author of LibrePythonista Extension. Today I was testing the extension in LibreOffice Developer. ------------------------------- Version: 25.8.0.0.alpha1 (X86_64) / LibreOffice Community Build ID: a2896e060b54ce6ce36e3e29218fac40d2919c74 CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded ------------------------------- This version of LibreOffice contains a pip installer. However, the pip installer is not a complete version. It is missing several files such as the following in the C:\Program Files\LibreOfficeDev 25\program\python-core-3.11.12\lib\pip\_vendor\distlib folder: - t32.exe - t64.exe - t64-arm.exe - w32.exe - w64.exe - w64-arm.exe When I try t install Pandas Manually in PowerShell I get the following Error: ------------------------------- & "C:\Program Files\LibreOfficeDev 25\program\python.exe" -m pip install pandas ... Installing collected packages: pytz, tzdata, six, numpy, python-dateutil, pandas ... File "C:\Program Files\LibreOfficeDev 25\program\python-core-3.11.12\lib\pip\_vendor\distlib\scripts.py", line 339, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File "C:\Program Files\LibreOfficeDev 25\program\python-core-3.11.12\lib\pip\_vendor\distlib\scripts.py", line 260, in _write_script launcher = self._get_launcher('t') ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\LibreOfficeDev 25\program\python-core-3.11.12\lib\pip\_vendor\distlib\scripts.py", line 419, in _get_launcher raise ValueError(msg) ValueError: Unable to find resource t64.exe in package pip._vendor.distlib ------------------------------- The t64.exe file and maybe more seem to be required to install Pandas. I suspect any existing methods to install Pandas and some other packages into LibreOffice will fail when embedded python with pip is used. This also affect LibrePythonista is it also installs Numpy, Pandas and more, or at least did on previous versions. With the built in pip LIbrePythonista can no longer Install the required packages. It is not really possible or recommended to install a second pip to get around this. I tired a workaround just to see if it could work and it does. My workaround was to download embeddable python 3.11.12 3 and extract is contents. Then I replaced C:\Program Files\LibreOfficeDev 25\program\python-core-3.11.12\lib\pip with the pip from the embedded version. I tested installing LibrePythonista and Pandas again and it worked. See Also: - https://ask.libreoffice.org/t/pip-in-libreoffice-2025-8-may-break-many-things-including-numpy-and-pandas/ - https://g.co/gemini/share/eef328cdc075
Thanks for reporting this issue. I don't have a Win build to test it but I think https://gerrit.libreoffice.org/c/core/+/185907 should fix it
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ffcdff2ff40124c58249f4a1219430610db7567f tdf#166746: pip: include .exe files It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Hello, there is a new daily build for windows containing the fix in https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/current/ Could you please install it to check whether my patch fixes the issue ? Thanks in advance
I downloaded and installed the latest nightly build and tested againg. The results are mostly good. I installed several packages without issued. - ooodev - sortedcontainers - verr - numpy - pandas- pillow and more. I tried another package named odfpy and this is were things got really strange. I tired to resolve why it was failing for hours. I thought maybe it does not install in LibreOfficeDev and python 3.11 even though it does install in LibreOffice and Python 3.9. This turns out not the be the issue. I verified this by installing python 3.11.9 no my system, using pyenv for windows, I created a virtual environment using python 3.11.9 then I activated the virtual environment and installed odfpy without any issue at all. I have a long conversation with Google Gemini about this trying to resolve the issue. Gemini's final thoughts were that the pip was actually broken. The whole conversation can be found here: https://g.co/gemini/share/7486a94d7a6b The Error is as follows: & "C:\Program Files\LibreOfficeDev 25\program\python.exe" -m pip install odfpy Defaulting to user installation because normal site-packages is not writeable Collecting odfpy Using cached odfpy-1.4.1.tar.gz (717 kB) ERROR: Error [WinError 5] Access is denied while executing command python setup.py egg_info Preparing metadata (setup.py) ... error ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied Check the permissions.
(In reply to vibrationoflife from comment #4) Could you please use a tool like Sysinternals Procmon, and find out which Access Denied could be the culprit? Thanks.
Hi vibrationoflife@pm.me, Thanks for your feedback. I think we can close this issue for now. the issue you are describing in comment 4 is likely another issue not related to the initial report. Please try what Mike suggested in comment 5 and fill a new report for it. Thanks in advance.
I did use Procmon. I am new to the tool, however I could not get to the root of the issue. There is a whole section in the Gemini conversation https://g.co/gemini/share/7486a94d7a6b about Procmon and how the error was not giving expected results. I am baffled why the odfpy package installs in LibreOffice with Python 3.9. Installs in a virtual environment with Python 3.11. Does NOT install for LibreOfficeDev with Python 3.11. I am speaking of windows of course. BTW I also tested Om a Mac book Air M2 for LibreOfficeDev, Did not install odfpy but all other packages such as matplotlib,numpy and pandas installed fine.
Well,odfpy now seems to be working on my Windows 10 system. The only change I made was install python 3.11.9 using Pyenv. pyenv is a tool used to manage multiple versions of python in your machine. I should not affect LibeOffice or LibreOfficeDev in any way. I completely removed LibreOfficeDev, python 3.11 folder and Users Folder. I installed LibreOfficeDev again and then tried installing odfpy in powershell and it worked fine. I spent hours trying to figure out the initial failure. I have no idea why it started working. >& "C:\Program Files\LibreOfficeDev 25\program\python.exe" -m pip install --upgrade --target=C:\Users\bigby\AppData\Roaming\Python\Python311\site-packages 'odfpy>=1.4' Collecting odfpy>=1.4 Using cached odfpy-1.4.1-py2.py3-none-any.whl Collecting defusedxml (from odfpy>=1.4) Using cached defusedxml-0.7.1-py2.py3-none-any.whl.metadata (32 kB) Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) Installing collected packages: defusedxml, odfpy Successfully installed defusedxml-0.7.1 odfpy-1.4.1