在安装paddleocr出现错误:
PS D:\mysoftware\Python\Scripts\PaddleOCR> pip install paddleocr -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting paddleocr
Using cached https://mirror.baidu.com/pypi/packages/8f/d0/1a2f9430f61781beb16556182baa938e8f93c8b46c27ad5865a5655fae05/paddleocr-2.7.0.3-py3-none-any.
whl (465 kB)
Collecting shapely (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/c7/d7/1bf4f48d83af09ce1af06c21752670fa8cdcafa72dbc452b809b215cda2a/shapely-2.0.2-cp312-cp312-win_a
md64.whl (1.4 MB)
Collecting scikit-image (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/dc/35/e6327ae498c6f557cb0a7c3fc284effe7958d2d1c43fb61cd77804fc2c4f/scikit_image-0.22.0-cp312-cp312
-win_amd64.whl (25.0 MB)
Collecting imgaug (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.w
hl (948 kB)
Collecting pyclipper (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/a1/f0/760e614b84dd4d8f03dd5432dda100d699e23074c263b38b6c117adc8395/pyclipper-1.3.0.post5-cp312-cp3
12-win_amd64.whl (108 kB)
Collecting lmdb (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/de/13/dd9b0c1924f0becc93e0bacd123a4e7a347966e3e74753ace3b1e85acc39/lmdb-1.4.1.tar.gz (881 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
py-lmdb: Using bundled liblmdb with py-lmdb patches; override with LMDB_FORCE_SYSTEM=1 or LMDB_PURE=1.
Traceback (most recent call last):
File "<string>", line 92, in <module>
ModuleNotFoundError: No module named 'patch_ng'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-_mus8qbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for
_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-_mus8qbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requi
res
self.run_setup()
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-_mus8qbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-_mus8qbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 94, in <module>
Exception: Building py-lmdb from source on Windows requires the "patch-ng" python module.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
安装patch_ng:
PS D:\mysoftware\Python\Scripts> pip install patch_ng
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting patch_ng
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c1/b2/ad3cd464101435fdf642d20e0e5e782b4edaef1affdf2adfc5c75660225b/patch-ng-1.17.4.tar.gz (17 k
B)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: patch_ng
Building wheel for patch_ng (pyproject.toml) ... done
Created wheel for patch_ng: filename=patch_ng-1.17.4-py3-none-any.whl size=16101 sha256=862fe3095bcd8416f84558ad88bc4766d23061a1e52c4b242a7668409f0cdd
00
Stored in directory: c:\users\shui\appdata\local\pip\cache\wheels\83\e2\18\fb2a67897706b15a5569a8a9fd3d8e5c6e24c49605da66880d
Successfully built patch_ng
Installing collected packages: patch_ng
Successfully installed patch_ng-1.17.4
[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
再次安装paddleocr:
PS D:\mysoftware\Python\Scripts> pip install paddleocr -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting paddleocr
Using cached https://mirror.baidu.com/pypi/packages/8f/d0/1a2f9430f61781beb16556182baa938e8f93c8b46c27ad5865a5655fae05/paddleocr-2.7.0.3-py3-none-any.
whl (465 kB)
Collecting shapely (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/c7/d7/1bf4f48d83af09ce1af06c21752670fa8cdcafa72dbc452b809b215cda2a/shapely-2.0.2-cp312-cp312-win_a
md64.whl (1.4 MB)
Collecting scikit-image (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/dc/35/e6327ae498c6f557cb0a7c3fc284effe7958d2d1c43fb61cd77804fc2c4f/scikit_image-0.22.0-cp312-cp312
-win_amd64.whl (25.0 MB)
Collecting imgaug (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.w
hl (948 kB)
Collecting pyclipper (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/a1/f0/760e614b84dd4d8f03dd5432dda100d699e23074c263b38b6c117adc8395/pyclipper-1.3.0.post5-cp312-cp3
12-win_amd64.whl (108 kB)
Collecting lmdb (from paddleocr)
Using cached https://mirror.baidu.com/pypi/packages/de/13/dd9b0c1924f0becc93e0bacd123a4e7a347966e3e74753ace3b1e85acc39/lmdb-1.4.1.tar.gz (881 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
py-lmdb: Using bundled liblmdb with py-lmdb patches; override with LMDB_FORCE_SYSTEM=1 or LMDB_PURE=1.
Traceback (most recent call last):
File "<string>", line 92, in <module>
ModuleNotFoundError: No module named 'patch_ng'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mysoftware\Python\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-6vqgmmvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for
_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-6vqgmmvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requi
res
self.run_setup()
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-6vqgmmvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\shui\AppData\Local\Temp\pip-build-env-6vqgmmvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 94, in <module>
Exception: Building py-lmdb from source on Windows requires the "patch-ng" python module.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
还是报一样的错误