HTCN icon indicating copy to clipboard operation
HTCN copied to clipboard

No module named 'model.utils.cython_bbox'

Open cuishuhao opened this issue 4 years ago • 5 comments

Hi, I ran python setup.py build develop. But when ran the train code, I got a ModuleNotFoundError of No module named 'model.utils.cython_bbox' the same with Issue I use python3.7.1 but it does not work. My environment is pytorch 1.0.1 and cuda 10.0.130 and python 3.7.1 and cython 0.29.20 and cudnn 7.6.5, and I wonder whether these environments are different.

cuishuhao avatar Jun 12 '20 04:06 cuishuhao

I've added another extension module in the setup.py ext_modules = [ extension( "model._C", sources, include_dirs=include_dirs, define_macros=define_macros, extra_compile_args=extra_compile_args, ), extension( "model.utils.cython_bbox", ["model/utils/bbox.pyx"], extra_compile_args={'cxx':[],'gcc': ["-Wno-cpp", "-Wno-unused-function"]}, include_dirs=[numpy_include] ) ] and now I don't see this issue anymore.

vidit09 avatar Aug 18 '20 09:08 vidit09

I've added another extension module in the setup.py ext_modules = [ extension( "model._C", sources, include_dirs=include_dirs, define_macros=define_macros, extra_compile_args=extra_compile_args, ), extension( "model.utils.cython_bbox", ["model/utils/bbox.pyx"], extra_compile_args={'cxx':[],'gcc': ["-Wno-cpp", "-Wno-unused-function"]}, include_dirs=[numpy_include] ) ] and now I don't see this issue anymore.

Thanks, it worked for me!

encounter1997 avatar Aug 18 '20 13:08 encounter1997

I add this, but a new error occurs:

NameError: name 'numpy_include' is not defined

Thus how to define the numpy_include?

kinredon avatar Nov 23 '20 12:11 kinredon

I add this, but a new error occurs:

NameError: name 'numpy_include' is not defined

Thus how to define the numpy_include?

Add this

try: numpy_include = np.get_include() except AttributeError: numpy_include = np.get_numpy_include()

lishugang avatar Jan 18 '21 11:01 lishugang

I should run export CUDA_HOME=/usr/local/cuda-11.0 firstly when I ran python setup.py build develop. This would solve my problem when anaconda cudatoolkit version is not consistent with system`s cuda version.

LeungWaiHo avatar Apr 12 '21 13:04 LeungWaiHo