USDView debug on MacOS M2

Hi
I’m unable to launch USDView (debug) on macOS (Apple M2). I’ve built USD with “–build-variant debug --build-target universal” flags on macOS

This is the error I get:

Traceback (most recent call last):
  File "/Users/...out/debug/bin/usdview", line 28, in <module>
    import pxr.Usdviewq as Usdviewq
  File "/Users/...out/debug/lib/python/pxr/Usdviewq/__init__.py", line 27, in <module>
    from pxr import Tf
  File "/Users/...out/debug/lib/python/pxr/Tf/__init__.py", line 164, in <module>
    PreparePythonModule()
  File "/Users/...out/debug/lib/python/pxr/Tf/__init__.py", line 89, in PreparePythonModule
    module = importlib.import_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/Users/.../out/debug/lib/python/pxr/Tf/_tf.so, 0x0002): symbol not found in flat namespace '__Py_RefTotal

Has anyone run into this? Note, release build of USDView works.
Thanks
Ashwin

Got this working by downgrading to Python 3.10.

@ashwin.bhat thanks for reporting back!

I noticed there’s this Py 3.11 PR still open: Enable Python 3.11 builds with Boost 1.82 by dgovil · Pull Request #2742 · PixarAnimationStudios/OpenUSD · GitHub

I wonder if that’d make any difference for your Py 3.11 case. I know @dhruvgovil does a lot of work on osx or Apple’s side so might have more details on whether it’s relevant.

Thanks, Roy. Yeah, the default Boost version catches people off guard.