Installing the USDZ Converter

While looking to install the USDZ converter on OSX (a Python library) I ran into some hurdles. Alternatively you can just use Reality Converter.

Normally on XCode 10, you could enable command line tools through Xcode → Preferences → Locations.

It seems as of XCode 11, you need in install a .pkg file to use the library which you can download from Apple’s site.

From there you’ll need to set your path variables. If you’re on OSX Catalina you can use a .zshrc file. For some reason my USDPython was installed in my applications directory instead of my user directory so I moved it there.

export PYTHONPATH="/Users/MYUSERNAME/usdpython/USD/lib/python:$PYTHONPATH"
export PATH="/Users/MYUSERNAME/usdpython/USD:$PATH"
export PATH="/Users/MYUSERNAME/usdpython/usdzconvert:$PATH"

From there I got the error:

Traceback (most recent call last):
  File "/Users/myusername/usdpython/usdzconvert/usdzconvert", line 17, in 
    usdUtils.printError("failed to import pxr module. Please add path to USD Python bindings to your PYTHONPATH.")
NameError: name 'usdUtils' is not defined

I found some solutions on this thread which requires you to use the previous version of usdpython, usdpython_0.62.

Hopefully this helps. Happy making!

Thoughts? Let me know @Aetherpoint