python - 我在为 python 安装 pdftotext 时遇到困难
问题描述
我正在尝试安装pdftotext
,但即使在安装了可视化工具后,我仍然会收到相同的错误。
两者都会发生这种情况,pip install
我只是想在我的目录中找到它......
下面的终端输出:
C:\Users\garec\Downloads>pip3 install pdftotext-2.1.4.tar.gz
Processing c:\users\garec\downloads\pdftotext-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:\Users\garec\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\garec\AppData\Local\Temp\pip-record-4zlbnvu1\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\garec\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\pdftotext'
cwd: C:\Users\garec\AppData\Local\Temp\pip-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:\Users\garec\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\garec\AppData\Local\Temp\pip-record-4zlbnvu1\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\garec\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\pdftotext' Check the logs for full command output.
解决方案
brew install pkg-config poppler
在你做之前尝试pip install pdftotext
(:
推荐阅读
- lotus-domino - Lotus Notes 脚本
- bash - 当运算符存储在变量中时,如何在 bash 中进行算术运算?
- javascript - 使用 Javascript 解析 SOAP 响应
- c# - 当我尝试以一对一关系添加新对象时,EF Core 更新以前的对象 ID 值
- google-sheets - 我正在尝试通过 Appscript 将我的谷歌表格数据推送到 Mailchimp
- python - 单击重置按钮(重置在 OptionMenus 上所做的选择)后,OptionMenu 对其他 OptionMenus 的依赖不起作用
- python - 通过符号链接运行 python 脚本不允许编写小 L
- python - 为什么matplotlib Ylabel在图上方返回字符串线
- python-3.x - 重写 __repr__ 'TypeError-expected 0 arguments, got 1' 时出错
- reactjs - 反应条件组件渲染