How To Setup or Install USD Library

Greetings sir/madam,
I have an issue when i try run this code below:

from pxr import Usd, UsdGeom
stage = Usd.Stage.CreateNew(‘HelloWorld.usda’)
xformPrim = UsdGeom.Xform.Define(stage, ‘/hello’)
spherePrim = UsdGeom.Sphere.Define(stage, ‘/hello/world’)
stage.GetRootLayer().Save()

I have already have Python software installed. But still the code hits error at the line “from pxr import”. Did I missed any step? I have included an attachment to show that I have installed Python latest version. Kindly advise me on my next step. Thanks in advance.

I even try to install this usd library but it hits error. I have included the error message in attachment. And I have attached the usd library file as well. Got this library from this link: usd-core · PyPI
usd_core-23.2-cp310-none-win_amd64.whl (12.2 MB)

Hi @salvinravindran. You’re very close! usd-core is only built for versions up to Python 3.10. Can you try using Python 3.10 or older? FWIW, we currently use Python 3.7 in Omniverse.

1 Like

Thanks @mati-nvidia , I will use the lower version and see.

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