Skip to content

make python-install will not install into virtual environment #2179

@CodeXTL

Description

@CodeXTL

Description

Followed the directions given in gtsam/python/README.md to build the Python wrappers for gtsam. The command make python-build functions as expected. However, the directions specify that the same command can be used to install into a virtual environment if the virtual environment is active, but this did not work for me. Even when I ran the command with an active virtual environment, it installed the wrapper package into my base interpreter.

Steps to reproduce

  1. Navigate to gtsam directory
  2. Create new virtual environment: python -m venv .env
  3. Activate new virtual environment: source .env/bin/activate
  4. Navigate to gtsam/build
  5. Run cmake .. -DGTSAM_BUILD_PYTHON=1 -DGTSAM_PYTHON_VERSION=3.6.10
  6. Run make python-install
  7. Check if installation successful: pip list

Expected behavior

When pip list is ran with the virtual environment active, the list should include the package gtsam with version 4.3a0.

Environment

  • Ubuntu Linux 24.04
  • Virtual environment with Python 3.12.3
  • Virtual environment with pip 25.1.1
  • CMake version 3.28.3
  • GNU Make 4.3

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