2

When importing open3d in python 3.6.9

Import fails.

>>> import open3d

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python3.6/dist-packages/open3d/linux/open3d.so: cannot open shared object file: No such file or directory

Checking the directory shows that file exists.

>>> quit()

myshell# cd /usr/local/lib/python3.6/dist-packages/open3d/linux/
myshell# ls -lah
total 14M
drwxr-sr-x 3 root staff 4.0K Aug 28 00:39 .
drwxr-sr-x 6 root staff 4.0K Aug 28 00:39 ..
-rw-r--r-- 1 root staff  196 Aug 28 00:39 __init__.py
-rwxr-xr-x 1 root staff 4.6M Aug 28 00:39 open3d.cpython-35m-x86_64-linux-gnu.so
-rwxr-xr-x 1 root staff 4.6M Aug 28 00:39 open3d.cpython-36m-x86_64-linux-gnu.so
-rwxr-xr-x 1 root staff 4.6M Aug 28 00:39 open3d.so
drwxr-sr-x 2 root staff 4.0K Aug 28 00:39 __pycache__

zendevil
  • 899
  • 4
  • 13
  • 26

1 Answers1

0

Try fixing the search paths and environment variables (LD_LIBRARY_PATH, e.g.), as shown in Why can't Python find shared objects that are in directories in sys.path? and https://serverfault.com/questions/527212/python-ubuntu-and-importerror-libblpapi3-64-so-cannot-open-shared-object-file.

I concede it is anyway cryptic that ImportError: /usr/local/lib/python3.6/dist-packages/open3d/linux/open3d.so... explicitly states the path. YMMV.

How did you get open3d in your system? Did you compile it? How did you install?

Possibly related:

https://github.com/open-mmlab/mmdetection/issues/2627

https://github.com/intel-isl/Open3D/issues/408

https://github.com/intel-isl/Open3D/issues/566