zaiweizhang / H3DNet

MIT License
211 stars 25 forks source link

ImportError: Could not import _ext module. #15

Closed giangdip2410 closed 3 years ago

giangdip2410 commented 3 years ago

When I trained model as your guideline , this bug happen. I tried to install step.py at pointnet2 folder but it can't install. Please help me to check . thank you

2021-02-05 02:46:53.256615: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1 5285 5050 331 316 Traceback (most recent call last): File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_utils.py", line 26, in import pointnet2._ext as _ext ModuleNotFoundError: No module named 'pointnet2._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train_1bb.py", line 171, in MODEL = importlib.import_module(FLAGS.model) # import network module File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/models/hdnet_1bb.py", line 23, in from backbone_module_scale import Pointnet2Backbone File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/models/backbone_module_scale.py", line 19, in from pointnet2_modules import PointnetSAModuleVotes, PointnetSAModuleVotesWith, PointnetFPModule, PointnetPlaneVotes File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_modules.py", line 21, in import pointnet2_utils File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_utils.py", line 30, in "Could not import _ext module.\n" ImportError: Could not import _ext module. Please see the setup instructions in the README: https://github.com/erikwijmans/Pointnet2_PyTorch/blob/master/README.rst

zaiweizhang commented 3 years ago

When you are trying to install pointnet2, what's the output? Can you paste it here? (after you run "python setup.py install")

giangdip2410 commented 3 years ago

@zaiweizhang thank you for your reply. this bug show then I run "python setup.py install"

running install running bdist_egg running egg_info writing pointnet2.egg-info/PKG-INFO writing dependency_links to pointnet2.egg-info/dependency_links.txt writing top-level names to pointnet2.egg-info/top_level.txt /usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) writing manifest file 'pointnet2.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'pointnet2._ext' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c _ext_src/src/ball_query.cpp -o build/temp.linux-x86_64-3.6/_ext_src/src/ball_query.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Parallel.h:149:0, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/utils.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/nn.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:12, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-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 _ext_src/src/ball_query.cpp:7:0: _ext_src/src/ball_query.cpp: In function ‘at::Tensor ball_query(at::Tensor, at::Tensor, float, int)’: _ext_src/include/utils.h:17:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^ _ext_src/include/utils.h:17:5: note: in definition of macro ‘CHECK_CONTIGUOUS’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^~~~ _ext_src/include/utils.h:17:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^ _ext_src/include/utils.h:17:5: note: in definition of macro ‘CHECK_CONTIGUOUS’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^~~~ _ext_src/include/utils.h:17:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^ _ext_src/include/utils.h:17:5: note: in definition of macro ‘CHECK_CONTIGUOUS’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^~~~ _ext_src/include/utils.h:17:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^ _ext_src/include/utils.h:17:5: note: in definition of macro ‘CHECK_CONTIGUOUS’ AT_CHECK(x.is_contiguous(), #x " must be a contiguous tensor"); \ ^~~~ _ext_src/include/utils.h:28:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^ _ext_src/include/utils.h:28:5: note: in definition of macro ‘CHECK_IS_FLOAT’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^~~~ _ext_src/include/utils.h:28:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^ _ext_src/include/utils.h:28:5: note: in definition of macro ‘CHECK_IS_FLOAT’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^~~~ _ext_src/include/utils.h:28:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^ _ext_src/include/utils.h:28:5: note: in definition of macro ‘CHECK_IS_FLOAT’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^~~~ _ext_src/include/utils.h:28:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^ _ext_src/include/utils.h:28:5: note: in definition of macro ‘CHECK_IS_FLOAT’ AT_CHECK(x.scalar_type() == at::ScalarType::Float, \ ^~~~ _ext_src/src/ball_query.cpp:20:20: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] if (new_xyz.type().is_cuda()) { ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:277:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ In file included from _ext_src/src/ball_query.cpp:7:0: _ext_src/include/utils.h:12:21: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor"); \ ^ _ext_src/src/ball_query.cpp:21:5: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(xyz); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:277:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ In file included from _ext_src/src/ball_query.cpp:7:0: _ext_src/include/utils.h:12:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor"); \ ^ _ext_src/include/utils.h:12:5: note: in definition of macro ‘CHECK_CUDA’ AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor"); \ ^~~~ _ext_src/include/utils.h:12:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor"); \ ^ _ext_src/include/utils.h:12:5: note: in definition of macro ‘CHECK_CUDA’ AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor"); \ ^~~~ _ext_src/src/ball_query.cpp:28:20: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] if (new_xyz.type().is_cuda()) { ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:277:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ _ext_src/src/ball_query.cpp:30:74: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] radius, nsample, new_xyz.data(), ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here T data() const { ^~~~ _ext_src/src/ball_query.cpp:31:53: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] xyz.data(), idx.data()); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here T data() const { ^~~~ _ext_src/src/ball_query.cpp:31:70: warning: ‘T at::Tensor::data() const [with T = int]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] xyz.data(), idx.data()); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from _ext_src/include/ball_query.h:7, from _ext_src/src/ball_query.cpp:6: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here T data() const { ^~~~ _ext_src/src/ball_query.cpp:33:5: error: ‘AT_CHECK’ was not declared in this scope AT_CHECK(false, "CPU not supported"); ^~~~ _ext_src/src/ball_query.cpp:33:5: note: suggested alternative: ‘DCHECK’ AT_CHECK(false, "CPU not supported"); ^~~~ DCHECK error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

zaiweizhang commented 3 years ago

I think this is your issue: https://github.com/facebookresearch/votenet/issues/83

Please try these changes: https://github.com/erikwijmans/Pointnet2_PyTorch/commit/1d5dca2673ee2831b9b01efe597b2ba8d12726f1

giangdip2410 commented 3 years ago

thank you @zaiweizhang . I will try to downgrade to Torch.1.4

giangdip2410 commented 3 years ago

@zaiweizhang : I downgraded to Torch1.4 this issue was solved but new bug happens:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train_1bb.py", line 40, in from tf_visualizer import Visualizer as TfVisualizer File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/utils/tf_visualizer.py", line 12, in import tf_logger File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/utils/tf_logger.py", line 6, in import tensorflow as tf File "/usr/local/lib/python3.6/dist-packages/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

zaiweizhang commented 3 years ago

I think the CUDA version has changed. Do you have CUDA 9.0? Have you set the path correctly?

zaiweizhang commented 3 years ago

Why don't you try to change the pointnet codes following this: https://github.com/erikwijmans/Pointnet2_PyTorch/commit/1d5dca2673ee2831b9b01efe597b2ba8d12726f1

Then you do not need to downgrade pytorch.

giangdip2410 commented 3 years ago

I do not have CUDA 9.0, now I am using CUDA 10.0. This bug I meet when run your code on Google colab

giangdip2410 commented 3 years ago

@zaiweizhang

I tried to update pointnet2 folder as erikwijmans/Pointnet2_PyTorch@ but it seem not working, same bug happen (I use goolge colab with default : Touch=1.7.0 and cuda101

2021-02-05 07:25:50.865804: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1 5285 5050 331 316 Traceback (most recent call last): File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_utils.py", line 26, in import pointnet2._ext as _ext ImportError: dynamic module does not define module export function (PyInit__ext)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train.py", line 167, in MODEL = importlib.import_module(FLAGS.model) # import network module File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/models/hdnet.py", line 23, in from backbone_module import Pointnet2Backbone File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/models/backbone_module.py", line 19, in from pointnet2_modules import PointnetSAModuleVotes, PointnetSAModuleVotesWith, PointnetFPModule, PointnetPlaneVotes File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_modules.py", line 21, in import pointnet2_utils File "/content/drive/My Drive/Computer_Vision/H3DNet/H3DNet/pointnet2/pointnet2_utils.py", line 30, in "Could not import _ext module.\n" ImportError: Could not import _ext module. Please see the setup instructions in the README: https://github.com/erikwijmans/Pointnet2_PyTorch/blob/master/README.rst

zaiweizhang commented 3 years ago

The changes are made for pytorch 1.4, 1.5 version. You can downgrade your pytorch 1.7 to 1.5 and keep the same CUDA version.

zaiweizhang commented 3 years ago

Closing. Feel free to open if you have other questions.

AbdulazizAlnahhas commented 3 years ago

I tried to downgrade pytorch to 1.5.1 and the same error still appeared Any ideas?

zaiweizhang commented 3 years ago

Are you using the same CUDA version?