Utilizing System Python for Library Installation in Superbuild Process

During the superbuild process, Python and the necessary packages are installed. However, within my Docker container, I wish to use my own Python. To achieve this, I typically set USE_SYSTEM_python3=OFF.

Subsequently, I’ve observed that none of the Python packages (such as ‘pathlib’) are installed, as my Python environment is a basic, unmodified (‘vanilla’) version.

Is there an efficient method to install the Python packages specified in the superbuild onto the system-provided Python?

Thank you :slight_smile:

Patrick

pathlib is a stdlib thing, so it should have it…

Well, that tells the superbuild to build its own copy. If you want to use a Python install the superbuild doesn’t build itself, you want to turn USE_SYSTEM_python3=ON.

So that means there’s no easy way to have a hybrid? i.e.

  1. Use system python
  2. Install required packages during superbuild

The superbuild should be able to install its packages to its own install/ directory.