[Python] Running Python in Power Automate Desktop

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    I'm testing out PA for desktop flows for Python scripts and encountered an error when loading modules. I would like to run Python script and return the output to PA variable. When I'm trying to load pandas I get the following error: "SyntaxError: future feature is not defined:annotations" (see the pic for the error message). How to solve this issue and make my code executable successfully? Here's the code I'm trying to run:

    import pandas as pd


    data = [
    {'a': 'Alice', 'b': 25}
    ]

    # Creating DataFrame
    df = pd.DataFrame(data)

    # Displaying the DataFrame
    print(df)


    I tried installing Python 3.4 on my machine but am experiencing issues downloading pandas and other modules due to SSL error (I couldn't solve that either). I did this to supply the modules for the Python version used in the flow.

    I'm quite new to Power Automate and am not a specialist in Python. Also, I tried running this code with both 2.7 and 3.4 Python. My computer has a different version of Python installed and I'm providing the path to my local installation of modules.

    Continue reading...

Compartilhe esta Página