Search code examples
pythonubuntushared-libraries

Install USD pixar library


I have some trouble for installing USD library on Ubuntu. Here is the tuto I want to follow.

On github, I cloned the git, run the script build_usd.py and change the env var. But when I want to run this simple code

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()

By changing the env var, eitheir the command "python " can't be found or the "module pxr" can't be found.

I tried to move the lib and include in my directory in usr/lib, ur/local/lib, usr/local/include but still pxr seems not to be found.

I am really confused about how to install and use library in general for python to found on ubuntu.


Solution

  • You should install usd-core library, which has the pxr module

    pip install usd-core