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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

install PIL in python

(0) ShareShare
ReportReport
Posted on by

hi,

I want to convert image to pdf and wanted to install PIL libraries in python to achieve the same task. Please suggest on how to install it

I have the same question (0)
  • Verified answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @asharma1 ,

     

    You can install PIP Library through Command Promt as show in below image.Use need to use this Commnad "pip install Pillow"

    VishnuReddy1997_0-1717051784668.png

     

    Once you install you can Run Power Schell script Action as shown in below image

    VishnuReddy1997_1-1717051933703.png

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

  • asharma1 Profile Picture
    on at

    I do not have python pre-installed in the system. I tried your method and its not working, should I install explicitly in my system and then go ahead with this approach?

    asharma1_0-1717052203424.png

     

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @asharma1 ,

     

    You need to install Python IDLE shell 3.12 in your system then only it work .

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

  • asharma1 Profile Picture
    on at

    Hi, I am trying to run the custom module in python script but its giving me this error while passing filepaths:

    asharma1_1-1717149702007.png

    My python code is as folllows:

    asharma1_2-1717149767328.png

     

    Please suggest why is it throwing an error while passing the filepaths?

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @asharma1 ,

     

    I cant see the image clearly instead of giving the paths here give the Paths in the code itlself and run as shown in below image.

     

    VishnuReddy1997_0-1717150061332.png

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

     

  • asharma1 Profile Picture
    on at

    How to pass variables in python code while invoking using powershell script?

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @asharma1 ,

     

    I have passed in the code itself as shown below.

    VishnuReddy1997_0-1717150504842.png

     

    Then invoked that file in the Power shell script action.

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

  • asharma1 Profile Picture
    on at

    I want the input to be dynamic and not hardcoded

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @asharma1 ,

     

    You pass the paths dynamically as shown in below images.

    VishnuReddy1997_0-1717150927682.png

     

    VishnuReddy1997_1-1717150963640.png

     

    In Python code use need to pass them as arguments so you need to add or make the changes as shown in below image.

    VishnuReddy1997_2-1717151080661.png

     

     

    (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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard