求救,MacOS安装pyhanlp出错

ERROR: Failed building wheel for jpype1
Running setup.py clean for jpype1
Failed to build jpype1
Installing collected packages: jpype1, pyhanlp
Attempting uninstall: jpype1
Found existing installation: JPype1 1.4.1
Uninstalling JPype1-1.4.1:
Successfully uninstalled JPype1-1.4.1
Running setup.py install for jpype1 … error
error: subprocess-exited-with-error

× Running setup.py install for jpype1 did not run successfully.
│ exit code: 1
╰─> [59 lines of output]
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> jpype1

note: This is an issue with the package mentioned above, not pip.

看看你的pip版本,pip版本>=23.1的话装不了,我这边 pip 22.3.1 版本安装已经开始 warning 了:

DEPRECATION: hanlp-downloader is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

谢谢。这个真是一个麻烦。我不在安装pyhanlp。直接用hanlp.