重点:
不要在PyCharm里直接安装 wkhtmltopdf !!!
从wkhtmltopdf官网下载macOS下的pdg安装包,下载页面:wkhtmltopdf
下载完后安装,通过 which 找到安装路径
import pdfkit config = pdfkit.configuration(wkhtmltopdf='/usr/local/bin/wkhtmltopdf') pdfkit.from_string("abc", "0.pdf", configuration=config)标签:pdfkit,macOS,No,wkhtmltopdf,报错,pdf From: https://www.cnblogs.com/ice5/p/17356458.html