Run RSTAB via API from Matlab/Powershell

Hello, I currently have a problem with accessing the RSTAB API. I have the Python file "MyTest.py" that controls the API and it works fine so far (code attached), but I actually want to control this file from Matlab, but I get the error message "No module named 'dlubal'" as soon as I run it. The same happens when I try to start the Python file via the Windows Shell, so running it from external sources somehow does not work. Could this possibly have something to do with the Python "myenv" environment? Please help.

Code from "MyTest.py" (the api_key_value is hidden here):

from dlubal.api import rstab

with rstab.Application(api_key_value="...", url="localhost", port=9000) as rstab_app:

    print(rstab_app.get_application_info())

    rstab_app.close_all_models(save_changes=False)

    rstab_app.create_model(name="Test")

    my_node = rstab.structure_core.Node(
        no=48,
        coordinate_1=1.0,
        coordinate_2=0.5,
        coordinate_3=-2.0
    )

    rstab_app.create_object(my_node)

Hello alex.muellner,

To use the API (gRPC) with Python, the package dlubal.api must be installed in the associated environment (in your case “myenv”).

More information about the installation can be found in the API documentation under Installation.

Best regards,
Marc