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

setup.py install error #188

Open
Luna-yu opened this issue Mar 22, 2021 · 4 comments
Open

setup.py install error #188

Luna-yu opened this issue Mar 22, 2021 · 4 comments

Comments

@Luna-yu
Copy link

Luna-yu commented Mar 22, 2021

(py) root@gao-PowerEdge-T640:~/yu_ex/warp-ctc3333/pytorch_binding# python setup.py install
running install
running bdist_egg
running egg_info
creating warpctc_pytorch.egg-info
writing warpctc_pytorch.egg-info/PKG-INFO
writing dependency_links to warpctc_pytorch.egg-info/dependency_links.txt
writing top-level names to warpctc_pytorch.egg-info/top_level.txt
writing manifest file 'warpctc_pytorch.egg-info/SOURCES.txt'
reading manifest file 'warpctc_pytorch.egg-info/SOURCES.txt'
writing manifest file 'warpctc_pytorch.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/warpctc_pytorch
copying warpctc_pytorch/init.py -> build/lib.linux-x86_64-3.6/warpctc_pytorch
running build_ext
building 'warpctc_pytorch._warp_ctc' extension
creating /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6
creating /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src
Emitting ninja build file /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] c++ -MMD -MF /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src/binding.o.d -pthread -B /root/ana3/envs/py/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/yu_ex/warp-ctc3333/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/TH -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/THC -I:/usr/local/cuda-11.1/include -I/root/ana3/envs/py/include/python3.6m -c -c /root/yu_ex/warp-ctc3333/pytorch_binding/src/binding.cpp -o /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src/binding.o -std=c++14 -fPIC -DWARPCTC_ENABLE_GPU -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_warp_ctc -D_GLIBCXX_USE_CXX11_ABI=0
FAILED: /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src/binding.o
c++ -MMD -MF /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src/binding.o.d -pthread -B /root/ana3/envs/py/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/yu_ex/warp-ctc3333/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/TH -I/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/THC -I:/usr/local/cuda-11.1/include -I/root/ana3/envs/py/include/python3.6m -c -c /root/yu_ex/warp-ctc3333/pytorch_binding/src/binding.cpp -o /root/yu_ex/warp-ctc3333/pytorch_binding/build/temp.linux-x86_64-3.6/src/binding.o -std=c++14 -fPIC -DWARPCTC_ENABLE_GPU -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_warp_ctc -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:149:0,
from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
from /root/ana3/envs/py/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from /root/yu_ex/warp-ctc3333/pytorch_binding/src/binding.cpp:6:
/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

In file included from /root/yu_ex/warp-ctc3333/pytorch_binding/src/binding.cpp:9:0:
/root/ana3/envs/py/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
#include <cuda_runtime_api.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/root/ana3/envs/py/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1539, in _run_ninja_build
env=env)
File "/root/ana3/envs/py/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "setup.py", line 64, in
cmdclass={'build_ext': BuildExtension}
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/root/ana3/envs/py/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/root/ana3/envs/py/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/root/ana3/envs/py/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/root/ana3/envs/py/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/ana3/envs/py/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/root/ana3/envs/py/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/ana3/envs/py/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/root/ana3/envs/py/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/root/ana3/envs/py/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/ana3/envs/py/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/root/ana3/envs/py/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/root/ana3/envs/py/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 670, in build_extensions
build_ext.build_extensions(self)
File "/root/ana3/envs/py/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/root/ana3/envs/py/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/root/ana3/envs/py/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/root/ana3/envs/py/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/root/ana3/envs/py/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 500, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/root/ana3/envs/py/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1255, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/root/ana3/envs/py/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

@DaobinZhu
Copy link

解决了吗?我也遇到了相同的错误。。

@sunsn1997
Copy link

请问你解决没

@wuxiaolianggit
Copy link

@大佬解决了吗?我也遇到这个问题 @DaobinZhu @Luna-yu @sunsn1997

@Extra-rich
Copy link

Have anyone figure it out how to solve this problem?

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

5 participants