Distributing USD to Windows based farm

Is there any official documentation on best practices for distributing USD after building in? Particularly in the context of a Windows based farm. I may have been mistaken, but I thought that after running the build, the build folder, it could simply be copied onto worker machines. However, it appears that this is not the case.
Is there some build setting I’ve missed or is this simply not possible on Windows?

Are you getting any sort of errors?
Generally the builds are portable as long as you copy around the whole install folder and set up the env variables accordingly.

I get a pretty unhelpful error message: image

I built it on Windows 10 Enterprise and I’m trying to run it on 10 Pro, but I doubt that’s the issue right?

Yeah the windows OS variant shouldn’t matter.
Are they the same version/build of windows however? As in one isn’t significantly older than the other? 0xc000007b is usually a sign that something you’re linking against is missing, either at the OS level or a library level

Do you get the same error if you try and import usd in Python? And are all the dependencies copied over as well?

Hmm, well I get slightly more information, but not enough for me to understand what I’m missing.
Are there more external dependencies I should be copying than just the build folder?

Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pxr import Usd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\USD\lib\python\pxr\Usd\__init__.py", line 24, in <module>
    from pxr import Tf
  File "C:\USD\lib\python\pxr\Tf\__init__.py", line 163, in <module>
  File "C:\USD\lib\python\pxr\Tf\__init__.py", line 88, in PreparePythonModule
    module = importlib.import_module(
  File "C:\Users\twerk\AppData\Local\Programs\Python\Python39-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _tf: %1 is not a valid Win32 application.

Build machine details:

  • Python 3.9.16
  • Windows 19045.3324

Worker machine details:

  • Python 3.9.13
  • Windows 19044.3086

Is one of your systems 64 bit by any chance? I see your Python instance is 32 bit

It’s been a while since I’ve been on windows but afaik you cant load 64bit libs in 32bit address space.

I had the same thought, but alas both are 64bit. The conda env I built from is showing 32bit also:

(USD) C:\>python
Python 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:28:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pxr import Usd

Ah dang. Okay, I’m out of ideas then unfortunately but hopefully someone more familiar with Windows can help. I’m a little rusty on that side.

Nonetheless, thanks for your time!

You could try using a tool like dumpbin or DependencyWalker to debug which DLL it might link to that it’s missing on the machine. Other options are mentioned here.

Does that help?

Thanks for calling out Dependency Walker, that pointed me to the fact that the python install was indeed 32bit on the worker.
Now looking back at my previous posts it’s obvious to me, one was 32bit and the other was 64bit, the win32 at the end of the line is just the platform :man_facepalming:.