ERROR: Could not build wheels for pikepdf, which is required to install pyproject.toml-based project

1、问题描述

使用pip下载第三方库python-office时,出现下载pikepdf的报错如下:

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for wordcloud
  Running setup.py clean for wordcloud
  Building wheel for fire (setup.py) ... done
  Created wheel for fire: filename=fire-0.5.0-py2.py3-none-any.whl size=116947 sha256=c97201c4568f2eb0aeff50ba1eb2b4061dfe11becfc1cc62d42a59a571349fd1
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\0a\36\39\b725f613f30ff13ad31e03771f3612b901fb149d1b1cfe785c
  Building wheel for python-docx (setup.py) ... done
  Created wheel for python-docx: filename=python_docx-0.8.11-py3-none-any.whl size=184519 sha256=146e465691820b7c042fe4d5a6a602453c02e6ed98c32dac6d5999e05ef70bfa
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\2f\74\7e\1a237af18ac4ee286855f4e677877944f332f82a2936fe912e
  Building wheel for python-pptx (setup.py) ... done
  Created wheel for python-pptx: filename=python_pptx-0.6.21-py3-none-any.whl size=470993 sha256=03cc0dd7c05b9cc2e107f2183d9f02440b746c9265998f66362255899015934e
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\74\06\c6\ffffc966f5deaf5e7da2f95c42281f9d928d9ae4e8b46d9eb9
Successfully built grapheme fpdf jieba moviepy fire python-docx python-pptx
Failed to build pikepdf wordcloud
ERROR: Could not build wheels for pikepdf, which is required to install pyproject.toml-based projects


2、解决方法

  • 请确认你没有使用Python3.11版本。目前python-office只支持Python的3.8、3.9、3.10版本

  • 所以解决方法是:降低Python的版本,然后再次下载。

你可能感兴趣的:(Python自动化办公社区,python,开发语言)