When I tried to import open3d, this is the error I got. Please help.
(dev) tpk@desktop:~$ python
Python 3.5.2 | packaged by conda-forge | (default, Jan 19 2017, 15:28:33)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import open3d
Traceback (most recent call last):
File "", line 1, in
File "/home/tpk/anaconda3/envs/dev/lib/python3.5/site-packages/open3d/__init__.py", line 9, in
from open3d.linux import *
File "/home/tpk/anaconda3/envs/dev/lib/python3.5/site-packages/open3d/linux/__init__.py", line 7, in
globals().update(importlib.import_module('open3d.linux.open3d').__dict__)
File "/home/tpk/anaconda3/envs/dev/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libglfw.so.3: cannot open shared object file: No such file or directory
Hi. It seems like libglfw.so.3 was not found.
There are two solutions.
util/scripts/install-deps-ubuntu.sh. It will install glfw3 in your system.To understand the issue better - are you using pip to install open3d? If you decide to go 'build from source' option, uninstall pip package before you begin since there would be multiple open3d modules (one from pip and another from the build) in your system.
I had tried both pip and build from source. Both yield the same error.
I think pip package is still being imported and looking for libglfw3 that is missing. If the package were built from source, libglfw3 should be built and be installed. Can you make clean environment that does not have pip package and retry?
or you can run:
sudo apt-get install libglfw3-dev
to explicitly install libglfw3.
sudo apt-get install libglfw3-dev
but : E: Unable to locate package libglfw3-dev
I guess your environment is Ubuntu 14.04.
libglfw3-dev is supported from Ubuntu 16.04. There are two options:
cmake ../src [other_cmake_options] -DBUILD_GLFW=ON