请问如何在paddle中使用pyltp句法分析工具?
Created by: Masterkmp
在AIstudio执行!pip install pyltp报错 ` creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src creating build/temp.linux-x86_64-3.7/ltp creating build/temp.linux-x86_64-3.7/ltp/thirdparty creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/regex creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/regex/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/program_options creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/program_options/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/serialization creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/serialization/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/smart_ptr creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/smart_ptr/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/dynet creating build/temp.linux-x86_64-3.7/ltp/thirdparty/dynet/dynet creating build/temp.linux-x86_64-3.7/ltp/thirdparty/maxent creating build/temp.linux-x86_64-3.7/ltp/src creating build/temp.linux-x86_64-3.7/ltp/src/splitsnt creating build/temp.linux-x86_64-3.7/ltp/src/segmentor creating build/temp.linux-x86_64-3.7/ltp/src/postagger creating build/temp.linux-x86_64-3.7/ltp/src/ner creating build/temp.linux-x86_64-3.7/ltp/src/parser.n creating build/temp.linux-x86_64-3.7/ltp/src/srl creating build/temp.linux-x86_64-3.7/ltp/src/srl/common creating build/temp.linux-x86_64-3.7/ltp/src/srl/common/model creating build/temp.linux-x86_64-3.7/ltp/src/srl/common/structure creating build/temp.linux-x86_64-3.7/ltp/src/srl/include creating build/temp.linux-x86_64-3.7/ltp/src/srl/include/base creating build/temp.linux-x86_64-3.7/ltp/src/srl/Srl creating build/temp.linux-x86_64-3.7/ltp/src/srl/Srl/model creating build/temp.linux-x86_64-3.7/patch creating build/temp.linux-x86_64-3.7/patch/libs creating build/temp.linux-x86_64-3.7/patch/libs/python creating build/temp.linux-x86_64-3.7/patch/libs/python/src creating build/temp.linux-x86_64-3.7/patch/libs/python/src/object creating build/temp.linux-x86_64-3.7/patch/libs/python/src/converter gcc -pthread -B /opt/conda/envs/python35-paddle120-env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iltp/include/ -Iltp/thirdparty/boost/include/ -Iltp/thirdparty/dynet/ -Iltp/thirdparty/eigen/ -Iltp/thirdparty/maxent/ -Iltp/src/ -Iltp/src/splitsnt -Iltp/src/segmentor/ -Iltp/src/postagger/ -Iltp/src/ner/ -Iltp/src/parser.n/ -Iltp/src/srl/ -Iltp/src/srl/common/ -Iltp/src/srl/include/ -Iltp/src/srl/Pi/ -Iltp/src/srl/Srl/ -Iltp/src/srl/tool/ -Iltp/src/utils/ -Ipatch/include/ -I/opt/conda/envs/python35-paddle120-env/include/python3.7m -c src/pyltp.cpp -o build/temp.linux-x86_64-3.7/src/pyltp.o -std=c++0x gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1
ERROR: Failed building wheel for pyltp Running setup.py clean for pyltp Failed to build pyltp Installing collected packages: pyltp Running setup.py install for pyltp ... error ERROR: Command errored out with exit status 1: command: /opt/conda/envs/python35-paddle120-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kasne8w8/pyltp/setup.py'"'"'; file='"'"'/tmp/pip-install-kasne8w8/pyltp/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-nypnwx4w/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-kasne8w8/pyltp/ Complete output (45 lines): running install running build running build_ext building 'pyltp' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src creating build/temp.linux-x86_64-3.7/ltp creating build/temp.linux-x86_64-3.7/ltp/thirdparty creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/regex creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/regex/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/program_options creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/program_options/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/serialization creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/serialization/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/smart_ptr creating build/temp.linux-x86_64-3.7/ltp/thirdparty/boost/libs/smart_ptr/src creating build/temp.linux-x86_64-3.7/ltp/thirdparty/dynet creating build/temp.linux-x86_64-3.7/ltp/thirdparty/dynet/dynet creating build/temp.linux-x86_64-3.7/ltp/thirdparty/maxent creating build/temp.linux-x86_64-3.7/ltp/src creating build/temp.linux-x86_64-3.7/ltp/src/splitsnt creating build/temp.linux-x86_64-3.7/ltp/src/segmentor creating build/temp.linux-x86_64-3.7/ltp/src/postagger creating build/temp.linux-x86_64-3.7/ltp/src/ner creating build/temp.linux-x86_64-3.7/ltp/src/parser.n creating build/temp.linux-x86_64-3.7/ltp/src/srl creating build/temp.linux-x86_64-3.7/ltp/src/srl/common creating build/temp.linux-x86_64-3.7/ltp/src/srl/common/model creating build/temp.linux-x86_64-3.7/ltp/src/srl/common/structure creating build/temp.linux-x86_64-3.7/ltp/src/srl/include creating build/temp.linux-x86_64-3.7/ltp/src/srl/include/base creating build/temp.linux-x86_64-3.7/ltp/src/srl/Srl creating build/temp.linux-x86_64-3.7/ltp/src/srl/Srl/model creating build/temp.linux-x86_64-3.7/patch creating build/temp.linux-x86_64-3.7/patch/libs creating build/temp.linux-x86_64-3.7/patch/libs/python creating build/temp.linux-x86_64-3.7/patch/libs/python/src creating build/temp.linux-x86_64-3.7/patch/libs/python/src/object creating build/temp.linux-x86_64-3.7/patch/libs/python/src/converter gcc -pthread -B /opt/conda/envs/python35-paddle120-env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iltp/include/ -Iltp/thirdparty/boost/include/ -Iltp/thirdparty/dynet/ -Iltp/thirdparty/eigen/ -Iltp/thirdparty/maxent/ -Iltp/src/ -Iltp/src/splitsnt -Iltp/src/segmentor/ -Iltp/src/postagger/ -Iltp/src/ner/ -Iltp/src/parser.n/ -Iltp/src/srl/ -Iltp/src/srl/common/ -Iltp/src/srl/include/ -Iltp/src/srl/Pi/ -Iltp/src/srl/Srl/ -Iltp/src/srl/tool/ -Iltp/src/utils/ -Ipatch/include/ -I/opt/conda/envs/python35-paddle120-env/include/python3.7m -c src/pyltp.cpp -o build/temp.linux-x86_64-3.7/src/pyltp.o -std=c++0x gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /opt/conda/envs/python35-paddle120-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kasne8w8/pyltp/setup.py'"'"'; file='"'"'/tmp/pip-install-kasne8w8/pyltp/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-nypnwx4w/install-record.txt --single-version-externally-managed --compile Check the logs for full command output. `