[Python] How to install the paddleocr package in Windows using Python

Discussão em 'Python' iniciado por Stack, Janeiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I have tried to install the paddleocr package but I am facing some issues. Can anyone help?

    Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\Local\Temp\pip-install-_ukt8xi7\pymupdf_7828f9dec7414e13b3072e1efcbac7f0\setup.py", line 550, in <module>
    subprocess.run( command, shell=True, check=True)
    File "C:\Users\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command 'cd mupdf-1.20.3-source/&&"devenv.com" platform/win32/mupdf.sln /Build "ReleaseTesseract|x64" /Project mupdf' returned non-zero exit status 1.
    [end of output]



    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for PyMuPDF
    error: subprocess-exited-with-error


    Running setup.py install for PyMuPDF did not run successfully. exit code: 1

    [85 lines of output] Error processing line 1 of C:\Users\Local\Programs\Python\Python311\Lib\site-packages\vision-1.0.0-py3.11-nspkg.pth:

    Traceback (most recent call last):
    File "<frozen site>", line 186, in addpackage
    File "<string>", line 1, in <module>
    File "<frozen importlib._bootstrap>", line 570, in module_from_spec
    AttributeError: 'NoneType' object has no attribute 'loader'

    Remainder of file ignored
    PyMuPDF/setup.py: sys.argv: ['C:\\Users\\Local\\Temp\\pip-install-_ukt8xi7\\pymupdf_7828f9dec7414e13b3072e1efcbac7f0\\setup.py', 'install', '--record', 'C:\\Users\\Local\\Temp\\pip-record-w7l0xxr8\\install-record.txt', '--single-version-externally-managed', '--compile', '--install-headers', '
    PyMuPDF/setup.py: PIP_BUILD_TRACKER: C:\Users\\Local\Temp\pip-build-tracker-h_b5m36u
    PyMuPDF/setup.py: mupdf_tgz already exists: C:\Users\\Local\Temp\pip-install-_ukt8xi7\pymupdf_7828f9dec7414e13b3072e1efcbac7f0\mupdf.tgz
    PyMuPDF/setup.py: Not extracting C:\Users\\Local\Temp\pip-install-_ukt8xi7\pymupdf_7828f9dec7414e13b3072e1efcbac7f0\mupdf.tgz because already exists: mupdf-1.20.3-source/
    PyMuPDF/setup.py: mupdf_local='mupdf-1.20.3-source/'
    PyMuPDF/setup.py: Building mupdf.
    PyMuPDF/setup.py: Cannot find devenv.com in default locations, using: 'devenv.com'
    PyMuPDF/setup.py: Building MuPDF by running: cd mupdf-1.20.3-source/&&"devenv.com" platform/win32/mupdf.sln /Build "ReleaseTesseract|x64" /Project mupdf
    '"devenv.com"' is not recognized as an internal or external command,
    operable program or batch file.
    Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\\Local\Temp\pip-install-_ukt8xi7\pymupdf_7828f9dec7414e13b3072e1efcbac7f0\setup.py", line 550, in <module>
    subprocess.run( command, shell=True, check=True)
    File "C:\Users\\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command 'cd mupdf-1.20.3-source/&&"devenv.com" platform/win32/mupdf.sln /Build "ReleaseTesseract|x64" /Project mupdf' returned non-zero exit status 1.
    [end of output]



    note: This error originates from a subprocess, and is likely not a problem with pip.
    error: legacy-install-failure

    Encountered error while trying to install package.


    PyMuPDF

    note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

    Continue reading...

Compartilhe esta Página