Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
appleyuchi opened this issue Aug 28, 2020 · 4 comments
Closed

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

appleyuchi opened this issue Aug 28, 2020 · 4 comments

Comments

@appleyuchi
Copy link

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
Copy link

AlongWY commented Aug 28, 2020

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

@appleyuchi
Copy link
Author

git submodule update 卡住不动啊。。。

@appleyuchi
Copy link
Author

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

  • upload completely sent off: 775 out of 775 bytes
  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Server: GitHub Babel 2.0
    < Content-Type: application/x-git-upload-pack-result
    < Transfer-Encoding: chunked
    < Expires: Fri, 01 Jan 1980 00:00:00 GMT
    < Pragma: no-cache
    < Cache-Control: no-cache, max-age=0, must-revalidate
    < Vary: Accept-Encoding
    < X-Frame-Options: DENY
    < X-GitHub-Request-Id: 82E4:19E5:BF00EC:106948D:5F489413
    <
    13:20:20.614093 pkt-line.c:80 packet: fetch-pack< NAK
    13:20:20.614111 pkt-line.c:80 packet: fetch-pack> 0000
    13:20:21.145064 pkt-line.c:80 packet: sideband< PACK ...
    13:20:21.145207 run-command.c:663 trace: run_command: git index-pack --stdin --fix-thin '--keep=fetch-pack 1099644 on Desktop' --check-self-contained-and-connected --pack_header=2,15555
    13:20:21.149648 git.c:439 trace: built-in: git index-pack --stdin --fix-thin '--keep=fetch-pack 1099644 on Desktop' --check-self-contained-and-connected --pack_header=2,15555

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

@appleyuchi
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants