After building with GPU support, how to I install python package?

Hi,

I followed the official instructions here and successfully built xgboost from source with multi-GPU spport.

Now I’m sitting in ~/git/xgboost/build directory, how can actually install it for python? There isn’t any instruction on that.

The instructions for R kind of worked with a little pre-existing knowledge. But there wasn’t anything on how to continue with python installation after compiling…

Thanks.

Hello, what I usually do is is navigate to the python package directory and install locally with pip: pip install -e /path/to/python_package/ [1]. Other suggestions include changing your python path to include the python package directory [2].

[1] https://stackoverflow.com/a/20043907/209882
[2] https://docs.python.org/3/using/cmdline.html#environment-variables

To confirm, the python_package direction is one level above, at xgboost/python_package.

Installing from here will pick up the binaries from xgboost/build?

Thanks @thvasilo

Yes. You can also find this information in the docs: https://xgboost.readthedocs.io/en/latest/build.html#python-package-installation

I see. I read that part in the docs, it wasn’t clear to me that it’d be picking up the binaries compiled.

Thanks for the pointers.