Pang-Yatian / Point-MAE

[ECCV2022] Masked Autoencoders for Point Cloud Self-supervised Learning
MIT License
448 stars 55 forks source link

ModuleNotFoundError: No module named 'pointnet2_ops' #3

Closed ldkong1205 closed 2 years ago

ldkong1205 commented 2 years ago

Thank you for sharing the source code.

For part segmentation, the following error is encountered: File "/Point-MAE/segmentation/pt.py", line 7, in <module> from pointnet2_ops import pointnet2_utils ModuleNotFoundError: No module named 'pointnet2_ops'

It seems that the folder named 'pointnet2_ops' is missing. Could you add it? Thanks

Pang-Yatian commented 2 years ago

Hi,

Could you please check whether you install the module successfully?

# PointNet++
pip install "git+git://github.com/erikwijmans/Pointnet2_PyTorch.git#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib"
ldkong1205 commented 2 years ago

Hi, thank you for your prompt reply!

The following error is reported during installing PointNet++:

pip install "git+git://github.com/erikwijmans/Pointnet2_PyTorch.git#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib" Collecting pointnet2_ops Cloning git://github.com/erikwijmans/Pointnet2_PyTorch.git to /tmp/pip-install-6w3mzbet/pointnet2-ops_5d20ebf575a34c878914924451adc20a Running command git clone -q git://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-6w3mzbet/pointnet2-ops_5d20ebf575a34c878914924451adc20a fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. WARNING: Discarding git+git://github.com/erikwijmans/Pointnet2_PyTorch.git#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib. Command errored out with exit status 128: git clone -q git://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-6w3mzbet/pointnet2-ops_5d20ebf575a34c878914924451adc20a Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement pointnet2-ops (unavailable) (from versions: none) ERROR: No matching distribution found for pointnet2-ops (unavailable)

I just Googled and found that the unauthenticated git protocol on port 9418 is no longer supported Error. we should use https://github.com instead of git://github.com.

The following command is viable: pip install "git+https://github.com/erikwijmans/Pointnet2_PyTorch.git#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib"

But it somehow stuck during wheel building. Any solutions for this?

Pang-Yatian commented 2 years ago

Please check your CUDA version matches your PyTorch version. We did not meet this issue.

ldkong1205 commented 2 years ago

Hi Yatian, the wheel building is successful after a few moments. You might need to update the PointNet++ installation command as stated above. Thank you again for your prompt reply.

Pang-Yatian commented 2 years ago

Thanks for pointing it out.

wangsenchen commented 2 years ago

Hello, did you encounter this situation when installing the pointnet2 library?

Cloning https://github.com/erikwijmans/Pointnet2_PyTorch.git to c:\users\xiaomumu\appdata\local\temp\pip-install-5i7vkh4_\pointnet2-ops_1abcf7a21ccb40348dd4ac624101674f Running command git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git 'C:\Users\xiaomumu\AppData\Local\Temp\pip-install-5i7vkh4_\pointnet2-ops_1abcf7a21ccb4 0348dd4ac624101674f' fatal: unable to access 'https://github.com/erikwijmans/Pointnet2_PyTorch.git/': Failed to connect to github.com port 443 after 21206 ms: Timed out error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git 'C:\Users\xiaomumu\AppData\Local\Temp\pip-install-5i7vkh4_\pointnet2-ops_1abcf7a21ccb40348dd4ac6241 01674f' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git 'C:\Users\xiaomumu\AppData\Local\Temp\pip-install-5i7vkh4_\pointnet2-ops_1abcf7a21ccb40348dd4ac624101 674f' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

wangsenchen commented 2 years ago

Hello, could you tell me the version of pytorch and cuda you use

ChenXQ8979 commented 1 year ago

Hi, have you sloed the problem?

bhatipriyanka commented 1 year ago

Hi, Hope you doing well. I used pytorch version = 10.1+cu111 and it worked for me as I have cuda 11.1.1( means111) you just check which version of cuda you have on your PC then accordingly do installation. Compare appropriate cuda version with respected torch version. (LINK : https://pytorch.org/get-started/previous-versions/ )

CUDA 11.1 command

pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html

nasheizhidaoei commented 11 months ago

Processing d:\pythonproject1\pointnet2_pytorch_master\pointnet2_ops_lib Preparing metadata (setup.py) ... done Requirement already satisfied: torch>=1.4 in d:\anaconda\envs\dxtorch\lib\site-packages (from pointnet2-ops==3.0.0) (1.12.1) Requirement already satisfied: typing_extensions in d:\anaconda\envs\dxtorch\lib\site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (4.7.1) Building wheels for collected packages: pointnet2-ops Building wheel for pointnet2-ops (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [72 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\pointnet2_ops copying pointnet2_ops\pointnet2_modules.py -> build\lib.win-amd64-3.8\pointnet2_ops copying pointnet2_ops\pointnet2_utils.py -> build\lib.win-amd64-3.8\pointnet2_ops copying pointnet2_ops_version.py -> build\lib.win-amd64-3.8\pointnet2_ops copying pointnet2_ops__init.py -> build\lib.win-amd64-3.8\pointnet2_ops running egg_info writing pointnet2_ops.egg-info\PKG-INFO writing dependency_links to pointnet2_ops.egg-info\dependency_links.txt writing requirements to pointnet2_ops.egg-info\requires.txt writing top-level names to pointnet2_ops.egg-info\top_level.txt reading manifest file 'pointnet2_ops.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no directories found matching 'pointnet2_ops_ext-src' writing manifest file 'pointnet2_ops.egg-info\SOURCES.txt' running build_ext building 'pointnet2_ops._ext' extension Traceback (most recent call last): File "", line 2, in File "", line 34, in File "D:\pythonProject1\Pointnet2_PyTorch_master\pointnet2_ops_lib\setup.py", line 20, in setup( File "D:\anaconda\envs\dxtorch\lib\site-packages\setuptools\init__.py", line 153, in setup return distutils.core.setup(**attrs) File "D:\anaconda\envs\dxtorch\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\anaconda\envs\dxtorch\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "D:\anaconda\envs\dxtorch\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\anaconda\envs\dxtorch\lib\site-packages\wheel\bdist_wheel.py", line 364, in run self.run_command("build") File "D:\anaconda\envs\dxtorch\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\anaconda\envs\dxtorch\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\anaconda\envs\dxtorch\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "D:\anaconda\envs\dxtorch\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\anaconda\envs\dxtorch\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\anaconda\envs\dxtorch\lib\site-packages\setuptools\command\build_ext.py", line 79, in run _build_ext.run(self) File "D:\anaconda\envs\dxtorch\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "D:\anaconda\envs\dxtorch\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "D:\anaconda\envs\dxtorch\lib\site-packages\torch\utils\cpp_extension.py", line 765, in build_extensions build_ext.build_extensions(self) File "D:\anaconda\envs\dxtorch\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "D:\anaconda\envs\dxtorch\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "D:\anaconda\envs\dxtorch\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "D:\anaconda\envs\dxtorch\lib\site-packages\setuptools\command\build_ext.py", line 202, in build_extension _build_ext.build_extension(self, ext) File "D:\anaconda\envs\dxtorch\lib\distutils\command\build_ext.py", line 528, in build_extension objects = self.compiler.compile(sources, File "D:\anaconda\envs\dxtorch\lib\site-packages\torch\utils\cpp_extension.py", line 738, in win_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "D:\anaconda\envs\dxtorch\lib\site-packages\torch\utils\cpp_extension.py", line 1474, in _write_ninja_file_and_compile_objects _write_ninja_file( File "D:\anaconda\envs\dxtorch\lib\site-packages\torch\utils\cpp_extension.py", line 2014, in _write_ninja_file assert len(sources) > 0 AssertionError Emitting ninja build file D:\pythonProject1\Pointnet2_PyTorch_master\pointnet2_ops_lib\build\temp.win-amd64-3.8\Release\build.ninja... [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pointnet2-ops Running setup.py clean for pointnet2-ops Failed to build pointnet2-ops ERROR: Could not build wheels for pointnet2-ops, which is required to install pyproject.toml-based projects how to solve this question?

wzh226 commented 9 months ago

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-7mm7bzr0/pointnet2-ops_febb989072b44b2a805dfbaaaf61f8c5 did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-7mm7bzr0/pointnet2-ops_febb989072b44b2a805dfbaaaf61f8c5 did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

wzh226 commented 9 months ago

Hi, have you sloved the problem?

shell0011 commented 6 months ago

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-7mm7bzr0/pointnet2-ops_febb989072b44b2a805dfbaaaf61f8c5 did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/erikwijmans/Pointnet2_PyTorch.git /tmp/pip-install-7mm7bzr0/pointnet2-ops_febb989072b44b2a805dfbaaaf61f8c5 did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Hi, I had the same problem as you and I solved it by updating setuptools. If you haven't solved the problem you can try the following commands: pip install --upgrade setuptools