Skip to main content

Notifications

Community site session details

Community site session details

Session Id : i5Dr9I01bj0AL5fs1F1MMT
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,324 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,324 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,324 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,324 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,324 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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 48 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 18 Super User 2025 Season 1

#3
CU12050101-0 Profile Picture

CU12050101-0 12

Overall leaderboard