Skip to content

[BUILD] Can't import pyopenvdb in Windows 10 #1125

Closed
@diegogangl

Description

@diegogangl

Environment

Operating System: Windows 10 / Python 3.9
Version / Commit SHA: VDB 8.0.1
CMake Version: 3.20.4
Compiler: msvc 2019

Describe the problem

The Python module builds but can't be imported, as it fails to load some DLL

To Reproduce

  1. Build OpenVDB with the Python module option.
  2. Open a powershell or regular prompt at the folder where the pyd file is
  3. Try to import pyopenvdb

Tried

  • Copying DLLs into the folder (Half-2_5.dll, libzstd.dll, openvdb.dll and boost_python39-vc142-mt-gd-x64-1_76.dll). I got these from the Dependencies tool.
  • Also tried adding snappy_64.dll
  • Appending the path to sys.path
  • Adding the path with os.add_dll_directory()
  • Look around the source code to figure out which dll is trying to find

No matter what I try I always get

>>> import pyopenvdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing pyopenvdb: The specified module could not be found.

I need to distribute the python module along with a project, so it needs to be portable (at least not require users to compile things). Is it possible to at least know which DLL is missing or where it's looking for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions