Closed jiaqiAA closed 3 years ago
I have the same problem with the RTX 3090 server which use CUDA 11.1. So the correspoding pytorch has to be 1.8.1 (or newer). By the way, g++ version is 9.3.0.
I meet the same problem QQ.
OK... Finally I fixed this issue.
It is because the building error of pykdtree which is written in C (not C++). I don't clearly know the mechanism of pytorch but I found that in pytorch 1.0.0, the BuildExtension module will call gcc to compile the C code which should be Okay. While in pytorch 1.8.1, the BuildExtension module will call c++ to compile which will cause error because of the type checking or some other grammar issue.
So the solution is to write another setup_c.py to compile the pykdtree module which uses standard build_ext module. The code is like follows:
…
from setuptools.command.build_ext import build_ext
…
ext_modules = [
pykdtree,
]
setup(
ext_modules = cythonize(ext_modules),
include_dirs=[numpy.get_include()],
cmd_class={
'build_ext': build_ext
}
)
Thanks very much, it is useful.
Thanks @AlexsaseXie very much, it works!
Hi,
When I run
python setup.py build_ext --inplace
, I met a problemDoes anyone know how to solve it? Thanks in advance.