[Python] Best way to use Astropy in C++ project?

Discussão em 'Python' iniciado por Stack, Maio 27, 2025.

  1. Stack

    Stack Membro Participativo

    I’m working on a C++ application (on Windows, using Visual Studio) that requires astronomical computations such as coordinate transformations, time conversions, and ephemeris handling. These features are well-supported by the Python library Astropy, which I would like to use in my C++ code.

    What is the best way to integrate Astropy into a C++ application?

    Some constraints and preferences:

    • I’d prefer not to reimplement all the functionality in C++ if Astropy already provides it.
    • Performance is not critical, but maintainability and ease of use are important
    • The final application should be as self-contained as possible (e.g., shipping with Python embedded if needed).

    Has anyone successfully used Astropy from C++ and can share a minimal working example or advice?

    Continue reading...

Compartilhe esta Página