GPBoost Python Package
Project description
GPBoost Python Package
This is the Python package implementation of the GPBoost library. See https://github.com/fabsig/GPBoost for more information on the modeling background and the software implementation.
Examples
- GPBoost R and Python demo illustrates how GPBoost can be used in R and Python
- More examples in the Python guide folder
Installation
Before you install
setuptools is needed. You can install this using pip install setuptools -U
32-bit Python is not supported. Please install the 64-bit version. See build 32-bit version with 32-bit Python section.
Install from PyPI using pip
In brief, run:
pip install gpboost -U
Below is a more detailed installation guide.
Install using precompiled Python wheel (.whl) file
Install wheel via pip install wheel
first. After that download the wheel file from whlFiles and install from the folder where you downloaded the .whl file using:
pip install gpboost-XXX.whl
Requirements
-
For Windows users, VC runtime is needed if Visual Studio (2015 or newer) is not installed.
-
For Linux users, glibc >= 2.14 is required.
-
For macOS users:
- The library file in distribution wheels is built by the Apple Clang (Xcode_8.3.3 for versions 2.2.1 - 2.3.1, and Xcode_9.4.1 from version 2.3.2) compiler. You need to install the OpenMP library. You can install the OpenMP library by the following command:
brew install libomp
.
- The library file in distribution wheels is built by the Apple Clang (Xcode_8.3.3 for versions 2.2.1 - 2.3.1, and Xcode_9.4.1 from version 2.3.2) compiler. You need to install the OpenMP library. You can install the OpenMP library by the following command:
Build from source
pip install --no-binary :all: gpboost
Requirements for building from sources
-
Installation from sources requires that you have installed CMake.
-
For macOS users, you can perform installation either with Apple Clang or gcc.
-
In case you prefer Apple Clang, you should install OpenMP (details for installation can be found in the Installation Guide) first and CMake version 3.16 or higher is required.
-
In case you prefer gcc, you need to install it (details for installation can be found in the Installation Guide) and specify compilers by running
export CXX=g++-7 CC=gcc-7
(replace "7" with version of gcc installed on your machine) first.
-
-
For Windows users, Visual Studio (or VS Build Tools) is needed.
Build with MinGW-w64 on Windows
pip install gpboost --install-option=--mingw
CMake and MinGW-w64 should be installed first.
It is recommended to use Visual Studio for its better multithreading efficiency in Windows for many-core systems
Build 32-bit version with 32-bit Python
pip install gpboost --install-option=--bit32
By default, installation in environment with 32-bit Python is prohibited. However, you can remove this prohibition on your own risk by passing the bit32
option (not recommended).
Install from GitHub
git clone --recursive https://github.com/fabsig/GPBoost.git
cd GPBoost/python-package
# export CXX=g++-7 CC=gcc-7 # macOS users, if you decided to compile with gcc, don't forget to specify compilers (replace "7" with version of gcc installed on your machine)
python setup.py install
Note: sudo
(or administrator rights in Windows) may be needed to perform the command.
If you get any errors during installation or due to any other reasons, you may want to build dynamic library from sources by any method you prefer and then just run python setup.py install --precompile
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gpboost-0.2.3-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7162202c1c080521589fa8ac972478cc9e36169acabc58787fe8367b9c36a871 |
|
MD5 | dcefbd3c42b521ae8a4cd14bba6f4f72 |
|
BLAKE2b-256 | d0b5ab84d2ef307391131185003e4c203ece3696c32700e5d9d4d6d133415065 |
Hashes for gpboost-0.2.3-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7387586bb4c28482642572fba9334823df0d8639efbd1abd9d7be2985cddb9e4 |
|
MD5 | c61b51b93c9e9233a1d2db7f68532ede |
|
BLAKE2b-256 | 8514225480139dd1f60bcf6bd136fded7f284167e98857ad13382c6472c99ba8 |
Hashes for gpboost-0.2.3-py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1a56adba80d5e0a1e10676110ee5e46acffbef03d8bfd5042dd4f8f7826b312 |
|
MD5 | 6c96ae1232ae1fab6ed9366722037818 |
|
BLAKE2b-256 | b0f8c02757d02e41300e70baebda152013db9a4e8d5d2a8c553a9ddadb6bce31 |