我在django python 3.10中使用了xhtml2pdf,它运行得很好。现在,我将我的python版本升级到3.11。我试着安装pip intall xhtml2pdf,结果出错了
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************我已经更新了pip,setuptools和安装好的枕头,visal。我已经安装了微软visal c++ 2015。我无法安装libxml2。我不知道在哪里找到currect文件和如何安装。我使用的是windows 11 pro 64位。
请帮帮我。
在python3.11中安装xhtml2pdf

发布于 2022-11-08 11:24:28
如果去github看看libxml2
https://github.com/GNOME/libxml2
您可以找到手册如何构建它。CMake (主要用于Windows)编译libxml的另一个选项是使用CMake:
cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build [possible options]
cmake --build libxml2-xxx-build
cmake --install libxml2-xxx-buildhttps://github.com/xhtml2pdf/xhtml2pdf/blob/master/requirements.txt
你会看看你还需要些什么。
arabic-reshaper>=2.1.0
coverage>=5.3
html5lib>=1.1
Pillow>=8.1.1
PyPDF3>=1.0.5
python-bidi>=0.4.2
reportlab>=3.5.53
svglib>=1.2.1
pyHanko>=0.12.1
pyhanko-certvalidator>=0.19.5然后使用
pip list检查输出。
https://stackoverflow.com/questions/74359359
复制相似问题