Skip to main content

Notifications

Community site session details

Community site session details

Session Id : fITdEp3cezrZGc3NyxD8zq
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,322 Super User 2025 Season 1 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,322 Super User 2025 Season 1 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,322 Super User 2025 Season 1 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,322 Super User 2025 Season 1 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,322 Super User 2025 Season 1 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard