admin管理员组

文章数量:1287645

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). This error is produced when I'm supplying the directory with the modules for my installation of Python (version 3.12.9) as the module folder. 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.

本文标签: pandasRunning Python in Power Automate DesktopStack Overflow