Unable to build & use pointnet2 extension library
Closed this issue · 1 comments
Hi,
I'm trying to run the code but I keep getting stuck in the problem of building the Pointnet2 library as stated in the README.md
Specifically, the installation from python setup.py install
seem to be successful with the following output:
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
/home/ntu_uwr-nsadjoli/.virtualenvs/qe_env/lib/python3.6/site-packages/torch/utils/cpp_extension.py:352: 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.'))
reading manifest file 'pointnet2.egg-info/SOURCES.txt'
writing manifest file 'pointnet2.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/pointnet2_cuda.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
creating stub loader for pointnet2_cuda.cpython-36m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/pointnet2_cuda.py to pointnet2_cuda.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pointnet2.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pointnet2.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pointnet2.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pointnet2.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
__pycache__.pointnet2_cuda.cpython-36: module references __file__
creating 'dist/pointnet2-0.0.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pointnet2-0.0.0-py3.6-linux-x86_64.egg
creating /home/ntu_uwr-nsadjoli/.virtualenvs/qe_env/lib/python3.6/site-packages/pointnet2-0.0.0-py3.6-linux-x86_64.egg
Extracting pointnet2-0.0.0-py3.6-linux-x86_64.egg to /home/ntu_uwr-nsadjoli/.virtualenvs/qe_env/lib/python3.6/site-packages
Adding pointnet2 0.0.0 to easy-install.pth file
Installed /home/ntu_uwr-nsadjoli/.virtualenvs/qe_env/lib/python3.6/site-packages/pointnet2-0.0.0-py3.6-linux-x86_64.egg
Processing dependencies for pointnet2==0.0.0
Finished processing dependencies for pointnet2==0.0.0
However, whenever I try to import pointnet2_cuda
from Python, it keeps giving me a libcudart.so.9.0 not available error, as can be seen below:
>>> import pointnet2_cuda as pointnet2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
Please do note that I'm trying this with the following relevant versions/specifications:
- OS: Pop_OS 18.04 (derivative of Ubuntu 18.04)
- PyTorch version 1.7.1
- GTX 1080 Ti
- CUDA 11.1 (latest CUDA version update for the GPU)
- NVCC 11.1.105
- Python 3.6.9
My suspicion is that the pointnet2 library was written to expect CUDA 9.0. However, I'd prefer if it can be compiled using whichever CUDA version is available on my machine to ensure best compatibility. May I know whether you've encountered similar problems to this before, and whether there are any solutions possible with this situation, @qiqihaer?
Thank you and looking forward to any replies regarding this situation.
I successfully build the lib from source, don't use the binary that comes from this library as it may not be compatible with your setup. delete the binary and run the install again then it would build from the source