Open3d: Import error

Created on 17 Jul 2018  路  5Comments  路  Source: intel-isl/Open3D

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

possible bug question

All 5 comments

Hi. It seems like libglfw.so.3 was not found.
There are two solutions.

  • Try run util/scripts/install-deps-ubuntu.sh. It will install glfw3 in your system.
  • Build from source. Actually this option is very easy. Please check out this.

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:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Timu777 picture Timu777  路  3Comments

taochenshh picture taochenshh  路  3Comments

samarth-robo picture samarth-robo  路  3Comments

mike239x picture mike239x  路  4Comments

mike239x picture mike239x  路  3Comments