Bug 165120 - [25.8] "\lib\site-packages" folder is missing
Summary: [25.8] "\lib\site-packages" folder is missing
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Macro-Python
  Show dependency treegraph
 
Reported: 2025-02-08 03:07 UTC by nobu
Modified: 2025-06-05 15:00 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2025-02-08 03:07:40 UTC
Description:
"\lib\site-packages" folder is missing.

Steps to Reproduce:
1. Install LibreOffice v25.8 newest master.

Actual Results:
2. The "python-core-3.11.11\lib\site-packages" folder is missing.

Expected Results:
2. If "site.py" is running properly, there should be a "site-packages" folder.


Reproducible: Always


User Profile Reset: No

Additional Info:
Reproducible with
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6042e60d69c40d1f307710e60a278cb286d68603
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 1 nobu 2025-02-16 00:33:02 UTC
Reproducible with

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b4059c4b9ae2230d9c6d722d457dca2216ddd581
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded
Comment 2 Xisco Faulí 2025-02-17 16:09:55 UTC
Maybe something that is WIN only ?
I see the folder is on Linux.
OTOH, is the folder there with previous versions of LibreOffice and python ? LibreOffice 25.2 with python 3.10
Comment 3 nobu 2025-02-18 08:00:51 UTC
(In reply to Xisco Faulí from comment #2)
> Maybe something that is WIN only ?
> I see the folder is on Linux.
> OTOH, is the folder there with previous versions of LibreOffice and python ?
> LibreOffice 25.2 with python 3.10

I think it's only Windows.
Version 25.8.0.0. alpha0 included in 2025/01/09 Python version switched from 3.10.16 to 3.11.11.
It happened at the same time.
Python has an option not to run site. py, so we believe it was intentionally left out for security.
Comment 4 Xisco Faulí 2025-03-05 15:30:21 UTC
Hi nobu,
I'm trying to understand the implications of the folder missing. Does it cause any issue in practice ? What is this folder used for ?
Comment 5 nobu 2025-03-06 09:42:47 UTC
(In reply to Xisco Faulí from comment #4)
> I'm trying to understand the implications of the folder missing. Does it
> cause any issue in practice ? What is this folder used for ?
---
It does not say yet if I have checked that there is no site-packages folder in the Windows version.
The following description is based on the assumption that the above has been confirmed.

---
Of course, whether there is a problem or not depends on the user.
If you just use it as the person in charge of development intended, there will probably be no problem.

---
The Python development environment usually has a site-packages folder, which always contains a README.txt file.
And the following short sentence is written in the file.
"This directory exists so that 3rd party packages can be installed here.  Read the source for site.py for more details."
In other words, the details tell you to read the description of site.py. There is a detailed description here.
https://docs.python.org/3.11/library/site.html

---
Chat-GPT is pretty accurate in answering questions about Python.
Try asking questions about convenience and danger in your native language.
He answers more correctly than I explain.

Please tell me about the convenience of site.py in python.
On the other hand, what is the danger of site.py in python?
Comment 6 nobu 2025-04-10 06:32:30 UTC
Reproducible with

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7c46846ad1aeeca7e38eb0aada6dc99b5fb701e3
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 7 Xisco Faulí 2025-04-16 14:22:33 UTC
Checking in LibreOffice 25.2.2.2, the path is C:\Program Files\LibreOffice\program\python-core-3.10.16\lib\site-packages
Comment 8 Xisco Faulí 2025-04-16 14:32:52 UTC
Folder is not there with

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 356f916d0e7dbab7f871c3feb19c6e1292c2a2f5
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded
Comment 9 nobu 2025-06-02 08:53:31 UTC
Reproducible with
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 98e6dae9f7fc9d9bfb646aed278d65be34aad92b
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 10 Xisco Faulí 2025-06-05 11:03:28 UTC
I believe this patch should fix it: https://gerrit.libreoffice.org/c/core/+/186208
Comment 11 Commit Notification 2025-06-05 14:05:39 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e925155733c8324339f2b7280779e8a295797e18

tdf#165120: pip: include .txt 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.
Comment 12 Mike Kaganski 2025-06-05 14:11:53 UTC
But which "3rd party packages can be installed" in the LibreOffice's Program Files?
Comment 13 Mike Kaganski 2025-06-05 14:19:40 UTC
The question is: what is the intended package management scheme in the newly included pip?

1. Where does pip put packages, when run with user credentials?
2. Where does pip put packages, when run with admin credentials?
2.1. If it uses a subdirectory under <installlocation> (e.g., under C:\Program Files\LibreOffice\program on Windows), then what happens with these packages on LibreOffice upgrade? I can tell, that the MSI-driven upgrade will remove the whole C:\Program Files\LibreOffice, with everything inside, even those things that weren't created by the installer. So - how then will package management look like? We have a "shared" directory under installlocation, which has a special treatment, if I remember correctly; e.g., the shared extensions will be restored there after the upgrade. But had we planned / tested anything about shared pip packages?
Comment 14 Xisco Faulí 2025-06-05 15:00:19 UTC
At least on linux, doing something like "instdir/program/python -m pip install numpy" the packages are installed in instdir/program/python-core-3.11.13/lib/python3.11/site-packages, and at least in my case, if the site-packages folder doesn't exists, it's created.
Anyway, before 47e110fc66292e76152252a90a0e20580c33c13d, the folder was created at build time, so restore that behaviour. Closing