tuhaihe commented on PR #1434: URL: https://github.com/apache/cloudberry/pull/1434#issuecomment-3525135689
> Could you explain why we need flag `--break-system-packages`? Where are these py packages installed, system library path for python? Is it possible to install them under `$GPHOME/lib`? Hi @gfphoenix78 Thanks for the review! The `--break-system-packages` flag is needed for Ubuntu 24.04 and newer, which enforce [PEP 668](https://peps.python.org/pep-0668/) restrictions. This policy prevents `pip install --user` from modifying system-managed Python environments. Without this flag, pip will refuse to install packages like `wheel` or `cython`, causing build failures. Regarding the installation location: when using `--user`, the packages are installed under the user’s local site directory (e.g., ~/.local/lib/python3.x/site-packages), not under the system library path. This avoids conflicts with system Python. Installing them into `$GPHOME/lib` would require customizing `PYTHONPATH` and ensuring consistent Python environments across all build and runtime contexts, which might introduce complexity and compatibility issues. The current approach minimizes intrusion into the system and maintains backward compatibility with other platforms like Rocky Linux and older Ubuntu versions. In short, `--break-system-packages` is only used as a fallback on Ubuntu 24.04+, while other systems continue using the existing safe paths. We will also need to update the build docs to guide the users to install the needed packages from the software source. If these packages are detected as installed, then will skip the installation during the build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
