Issue
I'm replicating the point cloud model from https://github.com/ZrrSkywalker/Point-NN/tree/main using Python 3.7.
When I run:
pip install pointnet2_ops_lib/.
I get the following error:
Looking in indexes: https://mirrors.nju.edu.cn/pypi/web/simple
Processing ./pointnet2_ops_lib
Preparing metadata (setup.py) ... done
Requirement already satisfied: torch>=1.4 in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from pointnet2-ops==3.0.0) (1.13.1)
Requirement already satisfied: typing-extensions in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (4.3.0)
Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99 in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (11.7.99)
Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96 in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (8.5.0.96)
Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66 in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (11.10.3.66)
Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (11.7.99)
Requirement already satisfied: setuptools in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.4->pointnet2-ops==3.0.0) (49.2.1)
Requirement already satisfied: wheel in /home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.4->pointnet2-ops==3.0.0) (0.41.2)
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
╰─> [91 lines of output]
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/pointnet2_ops
copying pointnet2_ops/__init__.py -> build/lib.linux-x86_64-3.7/pointnet2_ops
copying pointnet2_ops/_version.py -> build/lib.linux-x86_64-3.7/pointnet2_ops
copying pointnet2_ops/pointnet2_modules.py -> build/lib.linux-x86_64-3.7/pointnet2_ops
copying pointnet2_ops/pointnet2_utils.py -> build/lib.linux-x86_64-3.7/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'
writing manifest file 'pointnet2_ops.egg-info/SOURCES.txt'
creating build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src
creating build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/ball_query.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/cuda_utils.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/group_points.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/interpolate.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/sampling.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
copying pointnet2_ops/_ext-src/include/utils.h -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/include
creating build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/ball_query.cpp -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/ball_query_gpu.cu -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/bindings.cpp -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/group_points.cpp -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/group_points_gpu.cu -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/interpolate.cpp -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/interpolate_gpu.cu -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/sampling.cpp -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
copying pointnet2_ops/_ext-src/src/sampling_gpu.cu -> build/lib.linux-x86_64-3.7/pointnet2_ops/_ext-src/src
running build_ext
/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py:365: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 5.0 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 5 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/3DVision2021/yifeiwang/Point-NN/pointnet2_ops_lib/setup.py", line 38, in <module>
include_package_data=True,
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 364, in run
self.run_command("build")
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/home/3DVision2021/.conda/envs/pointnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 386, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (11.8) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.
[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
I have tried
pip install --upgrade setuptools
pip install nes-py --no-cache-dir
pip install --upgrade pip setuptools wheel
but it doesn't fix the error.
How can I fix this?
Solution
I solved the problem by following these steps:
From the error found that the environment is not compiled, it is presumed that the environment may lack pytorch-cuda package, install the corresponding package:
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
After the package is installed, it is found that it can be compiled, but an error message is displayed:
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 5.0 and above. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html. See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6 for instructions on how to install GCC 5 or higher.
The core error is 'You're running a too old version of GCC. We need GCC 5 or later'.Install more than 5 versions of GCC (after verification, there appear to be only 5 versions applicable).Find the appropriate package installation at https://anaconda.org/. For example:
conda install -c psi4 gcc-5-mp
pointnet2_ops_lib/ can then be successfully installed.
Answered By - y Wang
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.