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 / Integration between Py...
Power Automate
Unanswered

Integration between Python and PA at the environment configuration level

(0) ShareShare
ReportReport
Posted on by 2
Hello all
 
I installed python 3.12 and Power Automate Desktop on my device.
 
This is my script:
import requests
#import json
#import pandas as pd

def main():

    print("Data formatting and transfer completed successfully.")



main()
 
I got the following error:
 
Traceback (most recent call last):
  File "<string>", line 5, in <module>
ImportError: No module named requests
 
 
I am trying to run a python script on Power Automate Desktop. The code is correct, and it is work well when I tried to execute it separately, but when I put this code on Power Automate Desktop, it is not recognizing the packages import pandas as pd import requests import json
 
Although I already installed all the packages on my device by (pip install) and the script is working well on my device separately. But not with Power Automate.
 
Could you please help me on how to solve this problem?
How can I make the Power Automate Desktop able to recognize python packages?
I have the same question (0)
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
    Hey Hi,
     
    There are some issues with the Run Python Script action. As per my obseravtion i recommened to  Use Run Powershell script action to Run the Python script in Power automate desktop.
     
    Steps to Run Python script using Run Power shell script action.
    1. Save the Code as .py file and then invoke the Python script as shown in below image.
     
     
    If there any paths to be passed pass it as arguments a shown in below image and you pass the .py file as dynamically as shown in below image.
    try Py instead of Python in code if the above doesnt work.
     
     
    (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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard