USD Mac上运行失败
Python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized()
原因分析:
使用Conda python,而不是直接使用本机的的Python环境编译的USD。
解决方案:
在使用Conda python编译USD的时候加入额外的参数
python build_scripts/build_usd.py /opt/local/USD --build-args USD,"-DPXR_PY_UNDEFINED_DYNAMIC_LOOKUP=ON"
参考文档:
https://rhonabwy.com/2022/08/16/native-support-for-usd-tools-on-an-m1-mac/
Conda distributed Pythons are statically linked as a way to reduce unexpected system and installation coupling, but Python isn’t, to my knowledge, built in such a way that an external build system can robustly discover whether you are targeting a static or dynamically linked Python so we are forced to deal with it manually.
https://github.com/PixarAnimationStudios/USD/issues/1996#issuecomment-1217039438