Skip to content

"pip install gtsam" doesn't enforce working combination of requirements for python bindings #2264

@timbarfoot

Description

@timbarfoot

Description

It seems that a generic "pip install gtsam" does not install compatible requirements. In particular, "numpy" gets installed and by default is a new version (e.g., 2.0.0) that seems to not be compatible with the C++ binary that the python bindings are linking to. Downgrading "numpy" (e.g., to 1.26.4) seems to fix the issue, but this is not obvious and should either be documents or specified in "requirements.txt" so a compatible version gets automatically installed.

Steps to reproduce

  1. pip install gtsam (in a python 3.9.6 venv - this automatically installed numpy 2.0.0 for me)
  2. run any example - fails in a segmentation fault
  3. downgrade numpy to 1.26.4 and the examples work as expected

Expected behavior

Examples should run properly without having to figure out that the wrong numpy gets installed.

Environment

python 3.9.6 in venv

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions