benjiebob / SMALViewer

PyQt5 app for viewing SMAL meshes
GNU General Public License v3.0
25 stars 5 forks source link

File "/home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/load_obj.py", line 8, in <module> import neural_renderer.cuda.load_textures as load_textures_cuda ImportError: /home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/cuda/load_textures.cpython-37m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass #3

Closed monajalal closed 3 years ago

monajalal commented 3 years ago
$ python smal_viewer.py 
Traceback (most recent call last):
  File "smal_viewer.py", line 2, in <module>
    import pyqt_viewer
  File "/home/mona/research/3danimals/SMALViewer/pyqt_viewer.py", line 13, in <module>
    from smal.smal3d_renderer import SMAL3DRenderer
  File "/home/mona/research/3danimals/SMALViewer/smal/smal3d_renderer.py", line 6, in <module>
    import neural_renderer as nr
  File "/home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/__init__.py", line 3, in <module>
    from .load_obj import load_obj
  File "/home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/load_obj.py", line 8, in <module>
    import neural_renderer.cuda.load_textures as load_textures_cuda
ImportError: /home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/cuda/load_textures.cpython-37m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass
$ python
Python 3.7.6 (default, Jan  8 2020, 19:59:22) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.6.0'
>>> torch.version.cuda
'10.1'
benjiebob commented 3 years ago

This isn't an issue with the SMALViewer, rather this is caused because the CUDA modules of the pytorch port of neural renderer haven't been installed properly. Some things to check: make sure you have a recent GCC version installed e.g. I use gcc version 7.1.0. (test with gcc -v) and run the install with pip install neural_renderer_pytorch.

I recommend verifying neural renderer port has been successfully installed, e.g. by running their tests before proceeding with this one.

monajalal commented 3 years ago
$ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I will followup here later when I find a solution. Thank you.

monajalal commented 3 years ago

https://github.com/daniilidis-group/neural_renderer/issues/94