WinError 740" when using pdfkit + Python3: elevation req'd

Attempting to convert an HTML page to a PDF file with pdfkit results in the error [WinError 740] The requested operation requires elevation..

Code:

import pdfkit
path_wkthmltopdf = "D:\\w.exe"
config = pdfkit.configuration(wkhtmltopdf = path_wkthmltopdf )
pdfkit.from_url("http://www.google.com", 'd:\\out.pdf', configuration=config)

This error occurs because the program needs to be run with administrator privileges. To fix this, simply run the Python script as an administrator.