Song-Jingyu / PointPainting

This repository is an open-source PointPainting package which is easy to understand, deploy and run!
MIT License
238 stars 45 forks source link

ModuleNotFoundError: No module named 'spconv.core_cc.csrc.sparse.all.ops1d'; 'spconv.core_cc.csrc.sparse.all' is not a package #21

Closed MURALI14 closed 2 years ago

MURALI14 commented 2 years ago

Hello

While trying to execute the code !python -m pcdet.datasets.kitti.painted_kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/painted_kitti_dataset.yaml

the following error had occurred /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'pcdet.datasets.kitti.painted_kitti_dataset' found in sys.modules after import of package 'pcdet.datasets.kitti', but prior to execution of 'pcdet.datasets.kitti.painted_kitti_dataset'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) /content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/kitti/painted_kitti_dataset.py:442: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. dataset_cfg = EasyDict(yaml.load(open(sys.argv[2]))) Traceback (most recent call last): File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/kitti/painted_kitti_dataset.py", line 448, in save_path=ROOT_DIR / 'data' / 'kitti' File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/kitti/painted_kitti_dataset.py", line 424, in create_kitti_infos dataset = PaintedKittiDataset(dataset_cfg=dataset_cfg, class_names=class_names, root_path=data_path, training=False) File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/kitti/painted_kitti_dataset.py", line 23, in init dataset_cfg=dataset_cfg, class_names=class_names, training=training, root_path=root_path, logger=logger File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/dataset.py", line 34, in init self.dataset_cfg.DATA_PROCESSOR, point_cloud_range=self.point_cloud_range, training=self.training File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/processor/data_processor.py", line 16, in init cur_processor = getattr(self, cur_cfg.NAME)(config=cur_cfg) File "/content/drive/MyDrive/Pytorch/PointPainting-main/detector/pcdet/datasets/processor/data_processor.py", line 48, in transform_points_to_voxels from spconv.utils import VoxelGenerator File "/usr/local/lib/python3.7/site-packages/spconv-2.1.21-py3.7-linux-x86_64.egg/spconv/utils/init.py", line 27, in from spconv.core_cc.csrc.sparse.all.ops1d import Point2Voxel as Point2VoxelGPU1d ModuleNotFoundError: No module named 'spconv.core_cc.csrc.sparse.all.ops1d'; 'spconv.core_cc.csrc.sparse.all' is not a package

MURALI14 commented 2 years ago

Had tried with spconv1.0 library the issue got resolved

ChaoticEar commented 2 years ago

Had tried with spconv1.0 library the issue got resolved

Hello Murali, I have encountered the same issue while trying to run the code you mentioned. Can you tell me how to switch to spconv1.0 please? I've tried with pip install spconv==1.0.0 but with no luck. The oldest version on pip is 2.0.2

Song-Jingyu commented 2 years ago

You can follow this link to install it. https://github.com/traveller59/spconv/tree/v1.2.1

ChaoticEar commented 2 years ago

I installed spconv with pip install spconv-cu114 and problem solved.

shadismz commented 1 year ago

Hello, Have you had any errors regarding VoxelGenerator using spconv-cu114? I'm struggling with this error, I read your comment and install spconv-cu114, but the available version is 2.1.21. I wonder how did you handle it? (your spconv version must be 2.1.22 right?) I'd be pleased if you answer.