Installing pyuno Windows

How do I install pyuno in my python package?
I have windows 11 , Libre office , and I run Python 3.9 fron Spyder (Anaconda).
I want to open all the pdf files in a folder and run my internal macro on them and then save the files from Python . Here is the Python code i have thus far:

import os
import subprocess
import time
import pyuno

pdf_folder = "C:\Work_offline\Junk"

# Get a list of all PDF files in the folder
pdf_files = [os.path.join(pdf_folder, f) for f in os.listdir(pdf_folder) if f.endswith(".pdf")]

# Loop over the PDF files and open them in Libre Draw
for pdf_file in pdf_files:
    cmd = ["C:\Program Files\LibreOffice\program\soffice.exe", "--draw", pdf_file]

    # Wait for Libre Draw to start and load the document

    # Connect to Libre Draw and run the Macro1 macro
    localContext = pyuno.getComponentContext()
    resolver = localContext.ServiceManager.createInstanceWithContext("", localContext)
    ctx = resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")
    smgr = ctx.ServiceManager
    desktop = smgr.createInstanceWithContext("", ctx)

    # Get the document that was just opened
    component = desktop.getCurrentComponent()

    # Run the Macro1 macro
    oScriptProvider = component.getScriptProvider()
    oScript = oScriptProvider.getScript("")

You need to use the Python embedded in LibreOffice.
More information at Designing & Developing Python Applications - The Document Foundation Wiki

see also Python LibreOffice Programming — OOO Development Tools 0.8.5 documentation