isl-org / isl-org/Open3D

Open3D0.17 causes ImportError: DLL load failed while importing pybind.

Open
#6,424 2 comments 0 reactions 0 assignees View on GitHub
build/install
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Steps to reproduce the issue

#### I am building the latest master with CUDA=ON, but still keep running into DLL load failed while importing pybind.
I get the same issue when I build this with cuda=Off

I had no errors building from source and created a .whl per instructions for python3.9 , on Windows11.

```
from open3d.cpu.pybind import (camera, data, geometry, io, pipelines,
ImportError: DLL load failed while importing pybind: The specified module could not be found.
```

#### I built Open3D-0.17 (on Win 11, with CUDA12.2 ) following the docs:
```
mkdir build
cd build
Cmake-gui : configure and generate. **This uses the same python as system
cmake --build . --config Release --target ALL_BUILD

_:: Create pip package in build/lib_
:: This creates a .whl file that you can install manually.
cmake --build . --config Release --target pip-package

### Error message

Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import open3d
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Sku\AppData\Local\Programs\Python\Python39\lib\site-packages\open3d\__init__.py", line 93, in
from open3d.cpu.pybind import (core, camera, data, geometry, io, pipelines,
ModuleNotFoundError: No module named 'open3d.cpu'

### Open3D, Python and System information

```markdown
- Operating system: Windows 11 64-bit
- Python version: Python 3.9 / 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]`
- Open3D version: 0.17 (latest from git pull)**`print(open3d.__version__)` fails as import fails.
- System architecture: x64-based PC/nvidia
- Is this a remote workstation?: no
- How did you install Open3D?: build from source / followed by pip install *.whl
- Compiler version (if built from source): Visual studio 17 2022
```

### Additional information
- It seems I have [this similar issue](https://github.com/isl-org/Open3D/issues/5734) similar issue, but I get this even without CUDA,
- After seeing [this post ](https://stackoverflow.com/questions/59330863/cant-import-dll-module-in-python)on Win11 security controls, I have tried adding os.add_dll_directory ('%Users\python\dlls) in init.py, but to no avail.
- I downloaded procmon to verify dll loading, but even with the above statement, I don't see it loading the dlls. I suspect this is where the issue is but I have looked everywhere and haven't found a solution.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.