首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我对python库pikepdf有个问题

我对python库pikepdf有个问题
EN

Stack Overflow用户
提问于 2021-10-23 09:42:22
回答 2查看 479关注 0票数 5

当试图使用pip安装python moduel pikepdf时,会弹出以下错误:

代码语言:javascript
复制
Building wheels for collected packages: pikepdf
  Building wheel for pikepdf (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pikepdf (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      ...
      creating build\temp.win-amd64-cpython-310\Release\src\qpdf
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPOINTERHOLDER_TRANSITION=4 -IC:\Users\ME\AppData\Local\Temp\pip-build-env-dpc9ltd5\overlay\Lib\site-packages\pybind11\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc/qpdf\annotation.cpp /Fobuild\temp.win-amd64-cpython-310\Release\src/qpdf\annotation.obj /EHsc /bigobj /std:c++17
      annotation.cpp
      src/qpdf\annotation.cpp(4): fatal error C1083: Cannot open include file: 'qpdf/Constants.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pikepdf
Failed to build pikepdf
ERROR: Could not build wheels for pikepdf, which is required to install pyproject.toml-based projects

由于缺少头文件,创建车轮失败:

代码语言:javascript
复制
src/qpdf\annotation.cpp(4): fatal error C1083: Cannot open include file: 'qpdf/Constants.h': No such file or directory

这是用于pikepdf v6.0.0的。我以前的版本是v4.0.1.post1,运行良好。

这是可以从我身边补救的东西吗?

EN

回答 2

Stack Overflow用户

发布于 2022-09-14 11:16:49

只需列出所有可供pidepdf使用的版本:

代码语言:javascript
复制
pip index versions pikepdf

选择一个并安装它:

代码语言:javascript
复制
pip install pikepdf==5.6.1

请在较后的版本中签回此问题是否已解决。像这样的问题可以在他们的跟踪器:https://github.com/pikepdf/pikepdf/issues中报告。

列出的问题是众所周知的。来自https://github.com/pikepdf/pikepdf/issues/390

pikepdf 6需要qpdf 11,并降低所有早期版本的兼容性。..。二进制轮状态: Windows支持当前被.

阻塞

票数 1
EN

Stack Overflow用户

发布于 2022-11-20 00:34:36

Macbook,M1的解决方案

代码语言:javascript
复制
brew install qpdf

在它使用之后

代码语言:javascript
复制
pip install pikepdf

https://github.com/pikepdf/pikepdf/issues/274解决方案

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69686925

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档