HIT-SCIR / pyltp

pyltp: the python extension for LTP
1.53k stars 353 forks source link

Ubuntu20.04下面的安装问题-缺少头文件ltp/ner_dll.h #228

Closed appleyuchi closed 4 years ago

appleyuchi commented 4 years ago

Ubuntu20.04 Python3.6.10(anaconda环境下) 安装报错如下: python setup.py install running install running bdist_egg running egg_info writing pyltp.egg-info/PKG-INFO writing dependency_links to pyltp.egg-info/dependency_links.txt writing top-level names to pyltp.egg-info/top_level.txt reading manifest file 'pyltp.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '.h' under directory 'ltp/src' warning: no files found matching '.h' under directory 'ltp/src/framework' warning: no files found matching '.hpp' under directory 'ltp/src/framework' warning: no files found matching '.h' under directory 'ltp/src/utils' warning: no files found matching '.hpp' under directory 'ltp/src/utils' warning: no files found matching '.tab' under directory 'ltp/src/utils' warning: no files found matching '.cpp' under directory 'ltp/src/segmentor' warning: no files found matching '.h' under directory 'ltp/src/segmentor' warning: no files found matching '.hpp' under directory 'ltp/src/segmentor' warning: no files found matching '.cpp' under directory 'ltp/src/postagger' warning: no files found matching '.h' under directory 'ltp/src/postagger' warning: no files found matching '.hpp' under directory 'ltp/src/postagger' warning: no files found matching '.cpp' under directory 'ltp/src/ner' warning: no files found matching '.h' under directory 'ltp/src/ner' warning: no files found matching '.hpp' under directory 'ltp/src/ner' warning: no files found matching '.cpp' under directory 'ltp/src/parser.n' warning: no files found matching '.h' under directory 'ltp/src/parser.n' warning: no files found matching '.hpp' under directory 'ltp/src/parser.n' warning: no files found matching '.cpp' under directory 'ltp/src/srl' warning: no files found matching '.h' under directory 'ltp/src/srl' warning: no files found matching '.h' under directory 'ltp/thirdparty/boost' warning: no files found matching '.hpp' under directory 'ltp/thirdparty/boost' warning: no files found matching '.cpp' under directory 'ltp/thirdparty/boost' warning: no files found matching '.ipp' under directory 'ltp/thirdparty/boost' warning: no files found matching '' under directory 'ltp/thirdparty/eigen' warning: no files found matching '' under directory 'ltp/thirdparty/dynet' warning: no files found matching '.h' under directory 'ltp/thirdparty/maxent' warning: no files found matching '.cpp' under directory 'ltp/thirdparty/maxent' warning: no files found matching '.h' under directory 'patch' warning: no files found matching '.hpp' under directory 'patch' warning: no files found matching '*.cpp' under directory 'patch' writing manifest file 'pyltp.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext -- Configuring done CMake Warning (dev) at CMakeLists.txt:7 (add_library): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "pyltp" links to target "pybind11::module" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done -- Build files have been written to: /home/appleyuchi/pyltp/build/temp.linux-x86_64-3.6 Scanning dependencies of target pyltp [ 50%] Building CXX object CMakeFiles/pyltp.dir/src/pyltp.cpp.o /home/appleyuchi/pyltp/src/pyltp.cpp:15:10: fatal error: ltp/ner_dll.h: No such file or directory 15 | #include "ltp/ner_dll.h" | ^~~~~~~ compilation terminated. make[3]: [CMakeFiles/pyltp.dir/build.make:63: CMakeFiles/pyltp.dir/src/pyltp.cpp.o] Error 1 make[2]: [CMakeFiles/Makefile2:117: CMakeFiles/pyltp.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:124: CMakeFiles/pyltp.dir/rule] Error 2 make: [Makefile:118: pyltp] Error 2 Traceback (most recent call last): File "setup.py", line 93, in cmdclass=dict(build_ext=CMakeBuild) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/init.py", line 161, in setup return distutils.core.setup(**attrs) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 173, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 159, in call_command self.run_command(cmdname) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/command/install_lib.py", line 107, in build self.run_command('build_ext') File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 33, in run self.build_extension(ext) File "setup.py", line 59, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args + target_args, cwd=self.build_temp) File "/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2', 'pyltp']' returned non-zero exit status 2.

AlongWY commented 4 years ago

感觉是 ltp 和 pybind11 的 submodule 没有下载下来

appleyuchi commented 4 years ago

git submodule update 卡住不动啊。。。

appleyuchi commented 4 years ago

Accept-Encoding: deflate, gzip, br Content-Type: application/x-git-upload-pack-request Accept: application/x-git-upload-pack-result Content-Encoding: gzip Content-Length: 775

直接这里卡住就没法继续往下走了。。。也没有进度条。。。。

appleyuchi commented 4 years ago

这个软件业太难安装了。。。。