Unable to run 3d recon example
hmcty opened this issue · 8 comments
I've followed the README, but I'm still unable to run the show3d.py
example:
gs3drecon.py, line 13, in <module>
from gelsightcore import poisson_reconstruct
ImportError: cannot import name 'poisson_reconstruct' from 'gelsightcore' (unknown location)
After creating a virtual environment, I installed the package:
pip3 install . --upgrade
I've set both LD_LIBRARY_PATH
and PYTHONPATH
:
>>> echo $LD_LIBRARY_PATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore
>>> echo $PYTHONPATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight
Using the inspect package to print the members, I get the following:
>>> print(getmembers(gelsightcore))
[('__doc__', None), ('__file__', None), ('__loader__', <_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>), ('__name__', 'gelsightcore'), ('__package__', 'gelsightcore'), ('__path__', _NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])), ('__spec__', ModuleSpec(name='gelsightcore', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>, submodule_search_locations=_NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])))]
Any ideas?
It is possible that it may not work in python3.7.
It has only been tested in python3.8.
Can you use python3.8?
3.8 worked. Maybe we make a note in the README?
Just did! Thank you. I'll close this issue now.
I'm using Ubuntu18 but I'm unable to run the show3d.py
example. Have already checkout the Ubuntu18
branch and using python3.8.
This is the error:
Traceback (most recent call last):
File "examples/show3d.py", line 11, in <module>
from gelsight import gs3drecon
File "/home/<user>/lib/python3.8/site-packages/gelsight/gs3drecon.py", line 13, in <module>
from gelsightcore import poisson_reconstruct
ImportError: libIlmImf-2_3.so.24: cannot open shared object file: No such file or directory
I have updated libopenexr
to the latest version by running:
sudo apt-get install libopenexr-dev
To check the versions of libopenexr
, I ran:
ls /usr/lib/x86_64-linux-gnu/ | grep libIlmImf
and these are shown below:
libIlmImf-2_2.so.22
libIlmImf-2_2.so.22.0.0
libIlmImf.a
libIlmImf.so
libIlmImfUtil-2_2.so.22
libIlmImfUtil-2_2.so.22.0.0
libIlmImfUtil.a
libIlmImfUtil.so
Upon checking the Ubuntu packages (here), it seems that libIlmImfUtil-2_3.so.24
is only available in Ubuntu20? @debrashure do you have any idea why?
@hmccarty may I know if you're using Ubuntu 18?
hello Debbie, it works now, thank you so much! 😄
I've followed the README, but I'm still unable to run the
show3d.py
example:gs3drecon.py, line 13, in <module> from gelsightcore import poisson_reconstruct ImportError: cannot import name 'poisson_reconstruct' from 'gelsightcore' (unknown location)
After creating a virtual environment, I installed the package:
pip3 install . --upgrade
I've set both
LD_LIBRARY_PATH
andPYTHONPATH
:>>> echo $LD_LIBRARY_PATH /home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore >>> echo $PYTHONPATH /home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight
Using the inspect package to print the members, I get the following:
>>> print(getmembers(gelsightcore)) [('__doc__', None), ('__file__', None), ('__loader__', <_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>), ('__name__', 'gelsightcore'), ('__package__', 'gelsightcore'), ('__path__', _NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])), ('__spec__', ModuleSpec(name='gelsightcore', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>, submodule_search_locations=_NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])))]
Any ideas?
Could you tell me the versions of the python-related tools in your Ubuntu20.04?
I am using Ubuntu20.04 in VMware Station and my python version is 3.8
other tool's version:
numpy == 1.23.4 (the requirement version is 1.17.4)
open3d == 0.13.0 (as required)
opencv_python == 3.4.16 (the requirement version is 3.4.17.61, however, I did not find this releaesd version on the Opencv website, the closet version I can find is 3.4.16)
scipy == 1.93 (the requirement version is 1.8.0)
setuptools == 45.2.0
torch==1.13.0+cu117(the requirement version is 1.8.1)