我在为 python 安装 pdftotext 时遇到困难



我正在尝试安装pdftotext,但即使在安装了可视化工具后,我仍然收到同样的错误。

pip install都会发生这种情况,我只是想在我的目录中找到它。。。

下面的终端输出:

C:UsersgarecDownloads>pip3 install pdftotext-2.1.4.tar.gz
Processing c:usersgarecdownloadspdftotext-2.1.4.tar.gz
Using legacy setup.py install for pdftotext, since package 'wheel' is not installed.
Installing collected packages: pdftotext
Running setup.py install for pdftotext ... error
ERROR: Command errored out with exit status 1:
command: 'C:UsersgarecAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\garec\AppData\Local\Temp\pip-req-build-9ov7_rup\setup.py'"'"'; __file__='"'"'C:\Users\garec\AppData\Local\Temp\pip-req-build-9ov7_rup\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersgarecAppDataLocalTemppip-record-4zlbnvu1install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:UsersgarecAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38Includepdftotext'
cwd: C:UsersgarecAppDataLocalTemppip-req-build-9ov7_rup
Complete output (7 lines):
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
running install
running build
running build_ext
building 'pdftotext' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:UsersgarecAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\garec\AppData\Local\Temp\pip-req-build-9ov7_rup\setup.py'"'"'; __file__='"'"'C:\Users\garec\AppData\Local\Temp\pip-req-build-9ov7_rup\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersgarecAppDataLocalTemppip-record-4zlbnvu1install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:UsersgarecAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38Includepdftotext' Check the logs for full command output.

在执行pip install pdftotext之前先尝试brew install pkg-config poppler(:

相关内容

  • 没有找到相关文章

最新更新