Skip to content

Install the Khiops Library Using Pip 🛠 For Advanced users 🛠

Opting for pip is ideal for those with a comprehensive grasp of Python's ecosystem and an understanding of operating system specifics. This approach, while offering adaptability for custom setups, necessitates knowledge of environment setup and dependency handling.

The Khiops binaries must be installed as a prerequisite. This also ensures the installation of the appropriate version of MPICH library.

We support Python from 3.8 to 3.12.

You need to download and install the khiops-core package (via Apt) and then the Khiops library (via Pip). You can do this through the following shell commands:

sudo apt-get update -y && sudo apt-get install wget lsb-release -y && \
CODENAME=$(lsb_release -cs) && \
TEMP_DEB="$(mktemp)" && \
wget -O "$TEMP_DEB" "https://github.com/KhiopsML/khiops/releases/download/10.2.3/khiops-core-openmpi_10.2.3-1-${CODENAME}.amd64.deb" && \
sudo dpkg -i "$TEMP_DEB" || sudo apt-get -f -y install && \
rm -f $TEMP_DEB && \
pip install 'https://github.com/KhiopsML/khiops-python/releases/download/10.2.3.0/khiops-10.2.3.0.tar.gz'

You need to download and install the Khiops desktop application first:

Then, you can run the following Pip command:

pip install "https://github.com/KhiopsML/khiops-python/releases/download/10.2.3.0/khiops-10.2.3.0.tar.gz"

The default Python version on Rocky Linux 8 is 3.6, which does not meet our requirements (at least Python 3.8), please ensure a compatible Python version is installed before continuing.

Then, you need to download and install the khiops-core package (via Yum) and then the Khiops library (via Pip). You can do this through the following command:

sudo yum update -y && sudo yum install wget python3-pip -y && \
CENTOS_VERSION=$(rpm -E %{rhel}) && \
TEMP_RPM="$(mktemp).rpm" && \
wget -O "$TEMP_RPM" "https://github.com/KhiopsML/khiops/releases/download/10.2.3/khiops-core-openmpi-10.2.3-1.el${CENTOS_VERSION}.x86_64.rpm" && \
sudo yum install "$TEMP_RPM" -y && \
rm -f $TEMP_RPM && \
pip install 'https://github.com/KhiopsML/khiops-python/releases/download/10.2.3.0/khiops-10.2.3.0.tar.gz'

User Guide

  • Users who want to understand how to manage their Python packages can read the Pip user guide. It will also help those who work behind a company proxy.

  • We also encourage our users to use virtual environments. If you are not familiar with them, you can read this Python documentation page.

What You Should Know

You can consult the limitations or known issues for your operating system:

Currently, our packages are released on GitHub. In the coming weeks, we will transition to official repositories.

Important Note for users upgrading from the pre-10.2.0 versions of the pyKhiops package

If you are upgrading from a version prior to Khiops 10.2.0, it is essential to first make sure the pykhiops package is not installed in your Python environment. This ensures that your upgrade process is smooth and that the new version of Khiops installs without conflicts.

To uninstall pykhiops, please execute the following command in your terminal or command prompt, in your Python environment (use admin rights if necessary):

pip uninstall pykhiops -y
Pip and Conda Khiops installations should not be mixed.

If the users wish to switch from a Pip-based installation to a Conda-based installation, they need to deactivate the Python virtual environment Khiops had been installed into, via Pip. Or, if no virtual environment has been used, the users need to uninstall the Khiops Python package:

pip uninstall khiops

Even though the Khiops binaries would remain installed on the operating system, the Conda-based installation would take precedence over them.

Warning

The khiops-core binary will install or upgrade the system-wide MPICH library on your system. If you depend on another version of MPICH for other programs, please prefer an installation using Conda.

Warning

The installation of Khiops will utilize MPICH version 4.0.3 due to compatibility issues. This is why you need to use a dedicated command:

conda install -c conda-forge -c khiops khiops

Be aware that this may result in slower execution times compared to other platforms. This limitation is expected to be addressed in a future MPICH release.

Currently, our packages are released on GitHub. In the coming weeks, we will transition to official repositories.

Important Note for users upgrading from the pre-10.2.0 versions of the pyKhiops package

If you are upgrading from a version prior to Khiops 10.2.0, it is essential to first make sure the pykhiops package is not installed in your Python environment. This ensures that your upgrade process is smooth and that the new version of Khiops installs without conflicts.

To uninstall pykhiops, please execute the following command in your terminal or command prompt, in your Python environment (use admin rights if necessary):

pip uninstall pykhiops -y
Pip and Conda Khiops installations should not be mixed.

If the users wish to switch from a Pip-based installation to a Conda-based installation, they need to deactivate the Python virtual environment Khiops had been installed into, via Pip. Or, if no virtual environment has been used, the users need to uninstall the Khiops Python package:

pip uninstall khiops

Even though the Khiops binaries would remain installed on the operating system, the Conda-based installation would take precedence over them.

Warning

On the first run of Khiops, an MPI-related popup may appear due to parallel execution sockets; please allow access for optimal functionality.

Warning

The Khiops installer relies on embedded installers for Java and MPI. Antivirus software may remove executable files (.exe, .jar) during installation. In this case, you should add exceptions to your antivirus software or disable it during installation.

Warning

The java installer results in a system reboot on some systems (e.g. on Windows Server 2008)

Warning

Native packages for the Khiops binaries are not yet available for macOS, which means that you cannot install Khiops on macOS using Pip for now. You can use Conda or run our Docker container (x86-64 only).