Enable Installation of Python Package with System lib in a Virtual Environment (#9349)

This commit is contained in:
Oliver Holworthy
2023-07-04 22:46:17 +01:00
committed by GitHub
parent bb2de1fd5d
commit 6c9c8a9001
4 changed files with 47 additions and 6 deletions

View File

@@ -259,7 +259,7 @@ There are several ways to build and install the package from source:
import sys
import pathlib
libpath = pathlib.Path(sys.prefix).joinpath("lib", "libxgboost.so")
libpath = pathlib.Path(sys.base_prefix).joinpath("lib", "libxgboost.so")
assert libpath.exists()
Then pass ``use_system_libxgboost=True`` option to ``pip install``: