Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'pxr.Usdviewq' | OpenUSD and Conda #3474

Closed
JonathanKuelz opened this issue Dec 20, 2024 · 3 comments
Closed

No module named 'pxr.Usdviewq' | OpenUSD and Conda #3474

JonathanKuelz opened this issue Dec 20, 2024 · 3 comments
Labels
build Build-related issue/PR conda

Comments

@JonathanKuelz
Copy link

JonathanKuelz commented Dec 20, 2024

Description of Issue

Not sure if related, but I tried setting up OpenUSD (Ubuntu 22.04, Python 3.12, Conda) first, but failed to build it myself (same problem as reported in #3401 , but none of the suggested solutions work for me).

Instead, I downloaded pre-built libraries from here. Further, I installed usd-core via pip inside my conda environment.

The pip installation seems to be incomplete / not match the pxr source in the prebuilt libraries. Specifically, I experience the following behavior:

usdview

Traceback (most recent call last):
  File ".../OpenUSD/bin/usdview", line 11, in <module>
    import pxr.Usdviewq as Usdviewq
ModuleNotFoundError: No module named 'pxr.Usdviewq'

Listing the content of the pip-installed usd-core package indeed shows no Usdviewq:

ll .../anaconda3/envs/.../lib/python3.12/site-packages/pxr 
Ar Gf  __init__.py  Kind  Ndr  Pcp  Plug  pluginfo  __pycache__  Sdf  Sdr  Tf  Trace  Ts  Usd  UsdGeom  UsdHydra  UsdLux  UsdMedia  UsdPhysics  UsdProc  UsdRender  UsdRi  UsdShade  UsdSkel  UsdUI  UsdUtils  UsdVol  Vt  Work

To me, this looks l have an incomplete usd-core installation - but I don't know if this analysis is correct, nor how to resolve it.

System Information (OS, Hardware)

  • Ubuntu 22.04.5 LTS
  • i7-11700KF, GeForce RTX 3080 Ti
  • pip 24.3.1
  • conda 4.13.0

Package Versions

Tried it with both, usd-core==24.8 and usd-core==24.11.

If I can provide any more information to help resolve the issue let me know.

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10528

(This is an automated message. See here for more information.)

@meshula meshula added build Build-related issue/PR conda labels Dec 21, 2024
@meshula
Copy link
Member

meshula commented Dec 21, 2024

usd-core is literally the core, it doesn't include the Qt based components, so that's expected. Note that the nvidia binaries don't match the version in usd-core, so installing both at once into the same environment is not recommended.

If your interest is just to get up and running, and you don't want to globally install usd and it's components, I'd recommend using pyenv and venv instead, as those do not introduce the issues that conda does. We expect that you will be able to successfully build and run in a non-conda environment.

Although conda would be a great solution for OpenUSD work (I personally prefer to use conda in general!), there are currently many difficulties around it due to issues caused by conda's choice of static linking of python itself, shared dictionaries, and dynamic symbol look up. If you're interested in trying to solve those issues, it's worth pursuing, but if not, conda is of limited use for OpenUSD today.

@JonathanKuelz
Copy link
Author

Got it, thank you for the explanation.

I followed your advice and set everything up using pyenv/venv. As you said, I was able to build it and run usdview, so this workaround solves the issue for me - thanks for helping me out!

@JonathanKuelz JonathanKuelz changed the title No module named 'pxr.Usdviewq' No module named 'pxr.Usdviewq' | OpenUSD and Conda Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build-related issue/PR conda
Projects
None yet
Development

No branches or pull requests

3 participants