j96w / DenseFusion

"DenseFusion: 6D Object Pose Estimation by Iterative Dense Fusion" code repository
https://sites.google.com/view/densefusion
MIT License
1.1k stars 300 forks source link

How to rebuild lib/knn for solving the problem undefined symbol: _Py_Dealloc #198

Open Shoichi-Hasegawa0628 opened 3 years ago

Shoichi-Hasegawa0628 commented 3 years ago

Hello, When ./experiments/scripts/train_ycb.sh was executed, I encountered this problem. ImportError: /root/HSR/catkin_ws/src/DenseFusion/lib/knn/knn_pytorch/_knn_pytorch.so: undefined symbol: _Py_Dealloc

I read this same Issue. https://github.com/j96w/DenseFusion/issues/2#issue-403537166

However, I couldn't understand how to solve it.

The _knn_pytorch.so in this repo is built with python3. If you want to use python2, you need to rebuild the lib/knn (with PyTorch-0.4.1). For your case, please make sure your CFFI is correctly installed. More information https://cffi.readthedocs.io/en/latest/installation.html#linux-and-os-x-ucs2-versus-ucs4.

Does that mean rebuilding lib / knn after doing pip install cffi?

Also, do you know which folder the code used for rebuilding should be and what command should be executed? Thank you.