Closed WayneChen-cloud closed 3 years ago
I try to add import pyximport pyximport.install() in nums.py, and it can find 'nms.cpu_nums', but there is another problem:
fatal error: numpy/arrayobject.h: 没有那个文件或目录
^~~~~~~~~~~~~~~~~~~~~
compilation terminated. DistutilsExecError Traceback (most recent call last) ~/anaconda3/envs/transpose/lib/python3.9/distutils/unixccompiler.py in _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts) 116 try: --> 117 self.spawn(compiler_so + cc_args + [src, '-o', obj] + 118 extra_postargs)
~/anaconda3/envs/transpose/lib/python3.9/distutils/ccompiler.py in spawn(self, cmd) 909 def spawn(self, cmd): --> 910 spawn(cmd, dry_run=self.dry_run) 911
~/anaconda3/envs/transpose/lib/python3.9/distutils/spawn.py in spawn(cmd, search_path, verbose, dry_run) 90 cmd = cmd[0] ---> 91 raise DistutilsExecError( 92 "command %r failed with exit code %s" % (cmd, exitcode))
DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
After I "export CFLAGS=-I/nvme/usr/anaconda3/envs/transpose/lib/python3.9/site-packages/numpy/core/include" in the shell, the error is changed. The new error is as follows:
/nvme/usr/.pyxbld/temp.linux-x86_64-3.9/pyrex/nms/gpu_nms.c:628:10: fatal error: gpu_nms.hpp: 没有那个文件或目录
^~~~~~~~~~~~~
compilation terminated. how can I solve it?
hi, I run the 'make clean', and make it again. the error above disappare. But a new error occurs: ImportError: /nvme/usr/TransPose-main/lib/nms/gpu_nms.cpython-39-x86_64-linux-gnu.so: undefined symbol: cudaSetupArgument What does it mean? And how can i fix it?
Did you make the files in the correct directory? Please run the make command under the lib
directory
hi, thanks for your reply! It seems that the function named 'locate_cuda()' didn't return the right results in my machine. So i just give it the right path of cuda and nvcc manually, and it work for me.
hi, after I run Make, I still meet this error when I run the demo.ipynb: ModuleNotFoundError: No module named 'nms.cpu_nms' How can i deal with it?