安装paddleOCR 时ERROR: Failed building wheel for PyMuPDF
安装paddleocr将 PyMuPDF指定为1.19.0,解决问题。PaddleOCR在安装这块不够人性化,希望越来越好吧。
·
报错:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\MyPC\.conda\envs\py362\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96ea08fc67da47aead06b5b8117922a7\\setu
p.py'"'"'; __file__='"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96ea08fc67da47aead06b5b8117922a7\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.
StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MyPC\AppData\Local\Temp\pip-wheel-2k6d
cgz_'
cwd: C:\Users\MyPC\AppData\Local\Temp\pip-install-w5mox06y\pymupdf_96ea08fc67da47aead06b5b8117922a7\
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\fitz
copying fitz\__init__.py -> build\lib.win-amd64-3.6\fitz
copying fitz\fitz.py -> build\lib.win-amd64-3.6\fitz
copying fitz\utils.py -> build\lib.win-amd64-3.6\fitz
copying fitz\__main__.py -> build\lib.win-amd64-3.6\fitz
running build_ext
building 'fitz._fitz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\fitz
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./mupdf/include -I./mupdf/include/mupdf -I./mupdf/thirdparty/freetype/include -IC:\Users\MyPC\.conda\envs\py362\incl
ude -IC:\Users\MyPC\.conda\envs\py362\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include
\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcfitz/fitz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\fitz/fitz_wrap.obj
fitz_wrap.c
fitz/fitz_wrap.c(2755): fatal error C1083: Cannot open include file: 'fitz.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for PyMuPDF
Running setup.py clean for PyMuPDF
Failed to build PyMuPDF
Installing collected packages: PyMuPDF
Running setup.py install for PyMuPDF ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\MyPC\.conda\envs\py362\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96ea08fc67da47aead06b5b8117922a7\\se
tup.py'"'"'; __file__='"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96ea08fc67da47aead06b5b8117922a7\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else i
o.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\MyPC\AppData\Local\Temp\pip-record
-qm7np3e0\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\MyPC\.conda\envs\py362\Include\PyMuPDF'
cwd: C:\Users\MyPC\AppData\Local\Temp\pip-install-w5mox06y\pymupdf_96ea08fc67da47aead06b5b8117922a7\
Complete output (19 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\fitz
copying fitz\__init__.py -> build\lib.win-amd64-3.6\fitz
copying fitz\fitz.py -> build\lib.win-amd64-3.6\fitz
copying fitz\utils.py -> build\lib.win-amd64-3.6\fitz
copying fitz\__main__.py -> build\lib.win-amd64-3.6\fitz
running build_ext
building 'fitz._fitz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\fitz
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./mupdf/include -I./mupdf/include/mupdf -I./mupdf/thirdparty/freetype/include -IC:\Users\MyPC\.conda\envs\py362\in
clude -IC:\Users\MyPC\.conda\envs\py362\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\inclu
de\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcfitz/fitz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\fitz/fitz_wrap.obj
fitz_wrap.c
fitz/fitz_wrap.c(2755): fatal error C1083: Cannot open include file: 'fitz.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\MyPC\.conda\envs\py362\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96e
a08fc67da47aead06b5b8117922a7\\setup.py'"'"'; __file__='"'"'C:\\Users\\MyPC\\AppData\\Local\\Temp\\pip-install-w5mox06y\\pymupdf_96ea08fc67da47aead06b5b8117922a7\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) i
f os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\M
yPC\AppData\Local\Temp\pip-record-qm7np3e0\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\MyPC\.conda\envs\py362\Include\PyMuPDF' Check the logs for full command output.
解决方法:
安装paddleocr将 PyMuPDF指定为1.19.0,解决问题
pip install "paddleocr>=2.0.1" --upgrade PyMuPDF==1.19.0
PaddleOCR在安装这块不够人性化,希望越来越好吧
更多推荐
已为社区贡献1条内容
所有评论(0)