Pre-built USD package error: DLL load failed while importing _tf

Dear Nvidia community,
When using any USD functionality or importing the package, I run into the following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\peter\Documents\Programme\usd\lib\python\pxr\Tf\", line 164, in <module>
  File "C:\Users\peter\Documents\Programme\usd\lib\python\pxr\Tf\", line 89, in PreparePythonModule
    module = importlib.import_module(
  File "C:\Users\peter\AppData\Local\Programs\Python\Python38\lib\importlib\", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _tf: The specified module could not be found.

I stumbled upon other folks having the same issue, like in #1602, but all solutions were not successful.

Steps to Reproduce

  1. Download and extract the pre-built USD package from Nvidia.
  2. Add the usd/bin to the path variable.
  3. Add the usd/lib/python path to the pythonpath variable.
  4. Install 64bit Visual Studio redistributables.
  5. Update pyside 2, importlib to the newest version.
  6. Run usdcat test.usd in a terminal.

My system is running on Windows 11. I tested Python version 3.7, 3.8, 3.10 and 3.11.

Hi @peter111. Welcome to the forums! Two things to note here:

  1. You also need to add usd/lib to your PATH variable.
  2. This pre-built binary is built against Python 3.7 so you must make sure you are using that version of Python. The traceback you shared shows Python38.

Thanks a lot, that resolved it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.