lancopku / pkuseg-python

pkuseg多领域中文分词工具; The pkuseg toolkit for multi-domain Chinese word segmentation
MIT License
6.55k stars 986 forks source link

pip install failed on Python 3.10.9 #169

Open specman333 opened 1 year ago

specman333 commented 1 year ago

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pkuseg Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pkuseg Using cached https://pypi.tuna.tsinghua.edu.cn/packages/64/3a/090a533c7f0682d653633cfd2d33e9aab3e671379fb199aeb7fa9bd3c34a/pkuseg-0.0.25.tar.gz (48.8 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: cython in c:\users\lijing\appdata\roaming\python\python310\site-packages (from pkuseg) (0.29.35) Requirement already satisfied: numpy>=1.16.0 in d:\programdata\anaconda3\lib\site-packages (from pkuseg) (1.23.5) Building wheels for collected packages: pkuseg Building wheel for pkuseg (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [43 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\config.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\data.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\download.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\gradient.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\model.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\optimizer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\res_summarize.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\scorer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\trainer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg__init.py -> build\lib.win-amd64-cpython-310\pkuseg creating build\lib.win-amd64-cpython-310\pkuseg\dicts copying pkuseg\dicts\init.py -> build\lib.win-amd64-cpython-310\pkuseg\dicts creating build\lib.win-amd64-cpython-310\pkuseg\models copying pkuseg\models\init.py -> build\lib.win-amd64-cpython-310\pkuseg\models creating build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\postag\model.py -> build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\postag\init.py -> build\lib.win-amd64-cpython-310\pkuseg\postag creating build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\models\default\init__.py -> build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\feature_extractor.pyx -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\inference.pyx -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\dicts\default.pkl -> build\lib.win-amd64-cpython-310\pkuseg\dicts copying pkuseg\postag\feature_extractor.pyx -> build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\models\default\features.pkl -> build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\models\default\weights.npz -> build\lib.win-amd64-cpython-310\pkuseg\models\default running build_ext skipping 'pkuseg\inference.cpp' Cython extension (up-to-date) cythoning pkuseg/feature_extractor.pyx to pkuseg\feature_extractor.c cythoning pkuseg/postag/feature_extractor.pyx to pkuseg/postag\feature_extractor.c building 'pkuseg.inference' extension creating build\temp.win-amd64-cpython-310 creating build\temp.win-amd64-cpython-310\Release creating build\temp.win-amd64-cpython-310\Release\pkuseg "D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\ProgramData\anaconda3\lib\site-packages\numpy \core\include -ID:\ProgramData\anaconda3\include -ID:\ProgramData\anaconda3\Include "-ID:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-ID:\Program Files ( x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-ID:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tppkuseg\inference.cp p /Fobuild\temp.win-amd64-cpython-310\Release\pkuseg\inference.obj inference.cpp D:\ProgramData\anaconda3\include\pyconfig.h(59): fatal error C1083: 无法打开包括文件: “io.h”: No such file or directory error: command 'D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pkuseg Running setup.py clean for pkuseg Failed to build pkuseg Installing collected packages: pkuseg Running setup.py install for pkuseg ... error error: subprocess-exited-with-error

× Running setup.py install for pkuseg did not run successfully. │ exit code: 1 ╰─> [45 lines of output] running install D:\ProgramData\anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\config.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\data.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\download.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\gradient.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\model.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\optimizer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\res_summarize.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\scorer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\trainer.py -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg__init.py -> build\lib.win-amd64-cpython-310\pkuseg creating build\lib.win-amd64-cpython-310\pkuseg\dicts copying pkuseg\dicts\init.py -> build\lib.win-amd64-cpython-310\pkuseg\dicts creating build\lib.win-amd64-cpython-310\pkuseg\models copying pkuseg\models\init.py -> build\lib.win-amd64-cpython-310\pkuseg\models creating build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\postag\model.py -> build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\postag\init.py -> build\lib.win-amd64-cpython-310\pkuseg\postag creating build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\models\default\init__.py -> build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\feature_extractor.pyx -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\inference.pyx -> build\lib.win-amd64-cpython-310\pkuseg copying pkuseg\dicts\default.pkl -> build\lib.win-amd64-cpython-310\pkuseg\dicts copying pkuseg\postag\feature_extractor.pyx -> build\lib.win-amd64-cpython-310\pkuseg\postag copying pkuseg\models\default\features.pkl -> build\lib.win-amd64-cpython-310\pkuseg\models\default copying pkuseg\models\default\weights.npz -> build\lib.win-amd64-cpython-310\pkuseg\models\default running build_ext skipping 'pkuseg\inference.cpp' Cython extension (up-to-date) "D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\ProgramData\anaconda3\lib\site-packages\numpy \core\include -ID:\ProgramData\anaconda3\include -ID:\ProgramData\anaconda3\Include "-ID:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-ID:\Program Files ( x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-ID:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tppkuseg\inference.cp p /Fobuild\temp.win-amd64-cpython-310\Release\pkuseg\inference.obj inference.cpp D:\ProgramData\anaconda3\include\pyconfig.h(59): fatal error C1083: 无法打开包括文件: “io.h”: No such file or directory error: command 'D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe' failed with exit code 2 [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. ╰─> pkuseg

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

lcyyyyyyyyyyy commented 1 year ago

@.***,本次回复为系统自动回复!

null-von-sushi commented 1 year ago

Same issue for me 我也有這個問題

RayLei commented 1 year ago

我也遇到这个问题。楼主解决了吗?

Eliauk-coder commented 1 year ago

同问 怎么解决这个问题

lcyyyyyyyyyyy commented 1 year ago

@.***,本次回复为系统自动回复!

ChiayenGu commented 1 year ago

安装spacy-pkuseg,执行pip install spacy-pkuseg 即可

lcyyyyyyyyyyy commented 1 year ago

@.***,本次回复为系统自动回复!