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

Community site session details

Session Id : DSdi/aOZuKj2CGDbswqikQ
Power Automate - Power Automate Desktop
Answered

install PIL in python

Like (0) ShareShare
ReportReport
Posted on 30 May 2024 05:59:04 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

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 31 May 2024 at 10:24:48
    Re: install PIL in python

    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

     

     

  • asharma1 Profile Picture
    on 31 May 2024 at 10:17:00
    Re: install PIL in python

    I want the input to be dynamic and not hardcoded

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 31 May 2024 at 10:15:49
    Re: install PIL in python

    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 31 May 2024 at 10:12:43
    Re: install PIL in python

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

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 31 May 2024 at 10:07:59
    Re: install PIL in python

    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 31 May 2024 at 10:03:18
    Re: install PIL in python

    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,524 Super User 2025 Season 2 on 30 May 2024 at 07:06:09
    Re: install PIL in python

    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 30 May 2024 at 06:56:57
    Re: install PIL in python

    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

     

  • Verified answer
    VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 30 May 2024 at 06:52:37
    Re: install PIL in python

    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

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2