web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / python module error in...
Power Automate
Suggested Answer

python module error in power automate desktop

(2) ShareShare
ReportReport
Posted on by 2

i am trying to execute below part of my python script in power automate desktop

--------------------

# importing the pandas library

import pandas as pd

DataFile = "filepath";

#Reading Excel Files

test_data = pd.read_excel(DataFile);

-------------------------

However it is giving error "C:\Program Files\Python311\Lib\site-packages\pandas\__init__.py", line 1

from __future__ import annotations ^SyntaxError: future feature is not defined:annotations".

I tried searching on google it was showing future annotations supported for python >=3.7 and i am using python 3.11.9.

I have already given the module path in power automate desktop but still unable to resolve the error.

Also I have a doubt that in power automate desktop the option to select python version is showing 2.7 and 3.4 only and there is no option to upgrade. Is it because of that?

can anyone please help me on this? or is there any other alternative i can try (i have to use pandas only because of requirement)

I have the same question (0)
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
    Hey Hi,
     
    As of my observation to execute Python script in PAD, Run Python script action is not that feasible and it only supports 3.4 and 2.7 versions and few modlues are not supporting with that action.
     
    So try this method to run the Python script using PAD.
     
    Save the Python script as .py file and use Run PowerShell Script action and pass the path as shown in below image.
     
     
    (Note:- if you got your solution you can mark as solution and gives kudos)
     
     
     
    Thanks & Regards
    Vishnu Reddy
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard