Skip to content

[Python] Improve error message if certain submodule (cython or cpp) is not built #36553

Closed

Description

@jorisvandenbossche

xref conda-forge/arrow-cpp-feedstock#1035 (comment)

You can built a more minimal Arrow C++ / pyarrow (or distribute it in parts, potentially for conda-forge). This is already possible right now, and gives an error about the .so not being found at runtime. For example, removing libarrow_dataset.so from my conda env and then importing pyarrow's dataset submodule gives:

In [1]: import pyarrow.dataset as ds
...
ImportError: libarrow_dataset.so.1300: cannot open shared object file: No such file or directory

We should improve this error message: for each optional component, we can add a try/except around the import of the compiled module, re-raising an ImportError with a more informative error message about the subcomponent not being enabled / installed.

Activity

  1. added a commit that references this issue on Jul 7, 2023
  2. added this to the 13.0.0 milestone on Jul 7, 2023
  3. added a commit that references this issue on Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions