无法确定popplerqt5的版本|错误:为pythonpopplerqt5生成控制盘失败

2024-10-03 11:13:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用pdf和python进行文本提取。因为我已经扫描了pdf,所以我尝试使用Poppler和pyqt5。不幸的是,我无法在我的机器上正确安装python-poppler-qt5。我使用下面的命令安装pyqt5和
pip install PyQt5(这对我有效) pip install python-poppler-qt5(安装时出现以下异常)

(base) C:\Users\Manchat>pip install python-poppler-qt5
Collecting python-poppler-qt5
  Using cached https://files.pythonhosted.org/packages/af/e7/aa451d4ca0910472c4442d8aa6ef44300852926d85ad033b029a22157027/python-poppler-qt5-0.24.2.tar.gz
Building wheels for collected packages: python-poppler-qt5
  Building wheel for python-poppler-qt5 (setup.py) ... error
  ERROR: Complete output from command 'c:\users\manchat\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Manchat\\AppData\\Local\\Temp\\pip-install-ygve0spw\\python-poppler-qt5\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Manchat\AppData\Local\Temp\pip-wheel-g0bkt68v' --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_ext
  building 'popplerqt5' extension
  Can't determine version of poppler-qt5
  C:/Users/Manchat/AppData/Local/Continuum/anaconda3\Library\bin\sip.exe -I C:/Users/Manchat/AppData/Local/Continuum/anaconda3\sip -t POPPLER_V0_20_0 -c build\temp.win-amd64-3.7\Release -b build\temp.win-amd64-3.7\Release\poppler-qt5.sbf -I C:/Users/Manchat/AppData/Local/Continuum/anaconda3\sip\PyQt5 -t WS_WIN -t Qt_5_9_3 poppler-qt5.sip
  sip: Deprecation warning: poppler-qt5.sip:1: %Module version numbers are deprecated and ignored
  sip: QDomElement is undefined
  error: command 'C:/Users/Manchat/AppData/Local/Continuum/anaconda3\\Library\\bin\\sip.exe' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for python-poppler-qt5
  Running setup.py clean for python-poppler-qt5
Failed to build python-poppler-qt5
Installing collected packages: python-poppler-qt5
  Running setup.py install for python-poppler-qt5 ... error
    ERROR: Complete output from command 'c:\users\manchat\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Manchat\\AppData\\Local\\Temp\\pip-install-ygve0spw\\python-poppler-qt5\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Manchat\AppData\Local\Temp\pip-record-bqt5f0xx\install-record.txt' --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_ext
    building 'popplerqt5' extension
    Can't determine version of poppler-qt5
    C:/Users/Manchat/AppData/Local/Continuum/anaconda3\Library\bin\sip.exe -I C:/Users/Manchat/AppData/Local/Continuum/anaconda3\sip -t POPPLER_V0_20_0 -c build\temp.win-amd64-3.7\Release -b build\temp.win-amd64-3.7\Release\poppler-qt5.sbf -I C:/Users/Manchat/AppData/Local/Continuum/anaconda3\sip\PyQt5 -t WS_WIN -t Qt_5_9_3 poppler-qt5.sip
    sip: Deprecation warning: poppler-qt5.sip:1: %Module version numbers are deprecated and ignored
    sip: QDomElement is undefined
    error: command 'C:/Users/Manchat/AppData/Local/Continuum/anaconda3\\Library\\bin\\sip.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command "'c:\users\manchat\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Manchat\\AppData\\Local\\Temp\\pip-install-ygve0spw\\python-poppler-qt5\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Manchat\AppData\Local\Temp\pip-record-bqt5f0xx\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Manchat\AppData\Local\Temp\pip-install-ygve0spw\python-poppler-qt5\

我试过做这么多不同的事情,但无法达到这个安装的成功。如果有人能帮我解决这个问题,那将是一个很大的帮助。在


Tags: installpipbuildlocalexeusersappdatatemp