Use sys.base_prefix instead of sys.prefix (#9711)

* Use sys.base_prefix instead of sys.prefix

* Update libpath.py too
This commit is contained in:
Philip Hyunsu Cho
2023-10-23 23:31:40 -07:00
committed by GitHub
parent 22e891dafa
commit a408254c2f
2 changed files with 5 additions and 5 deletions

View File

@@ -132,7 +132,7 @@ def locate_or_build_libxgboost(
if build_config.use_system_libxgboost:
# Find libxgboost from system prefix
sys_prefix = pathlib.Path(sys.prefix)
sys_prefix = pathlib.Path(sys.base_prefix)
sys_prefix_candidates = [
sys_prefix / "lib",
# Paths possibly used on Windows