-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
usdview: No module named 'pxr' #2054
Comments
Filed as internal issue #USD-7670 |
@andrewp2010 I'm not really sure what's going on here, what do the contents of /usr/local/USD/lib/python look like? Are you able to just do "from pxr import Usd" in a Python interpreter? You might also try running |
I have the same issue, everything else seems fine
I can use usdtree though
|
k, was able to run it. the issue was that PYTHONPATH was wrong, it needs to be /opt/local/USD/lib/python and not python binary itself. my bad!! |
Has anyone encountered this bug on Windows with Python versions of various natures? I Have Python 3.11 installed and in default system path via env var.
`(venv) C:\Program Files\Python311\Lib\site-packages\pxr>usdview (venv) C:\Program Files\Python311\Lib\site-packages\pxr>ipython In [1]: import pxr In [2]: import pxr.Usdviewq as UsdviewqModuleNotFoundError Traceback (most recent call last) ModuleNotFoundError: No module named 'pxr.Usdviewq'` Curious about the windows equivalent of export PYTHONPATH. I have no other listing on pxr other than site-packages in C:\Program Files\Python311\Lib\site-packages\pxr where my default Python311 is installed and I get this in default command or with venv I setup like anaconda, which also has no other pxr site references. `(venv) C:\Program Files\Python311\Lib\site-packages\pxr>dir Directory of C:\Program Files\Python311\Lib\site-packages\pxr 03/12/2024 11:54 AM .03/12/2024 11:54 AM .. 03/12/2024 11:54 AM Ar 03/12/2024 11:54 AM 17,408 boost_atomic-vc142-mt-x64-1_82.dll 03/12/2024 11:54 AM 193,024 boost_python311-vc142-mt-x64-1_82.dll 03/12/2024 11:54 AM 229,376 boost_regex-vc142-mt-x64-1_82.dll 03/12/2024 11:54 AM Gf 03/12/2024 11:54 AM Kind 03/12/2024 11:54 AM Ndr 03/12/2024 11:54 AM Pcp 03/12/2024 11:54 AM Plug 03/12/2024 11:54 AM pluginfo 03/12/2024 11:54 AM Sdf 03/12/2024 11:54 AM Sdr 03/12/2024 11:54 AM 401,280 tbb.dll 03/12/2024 11:54 AM 74,112 tbbbind.dll 03/12/2024 11:54 AM 86,400 tbbbind_debug.dll 03/12/2024 11:54 AM 246,656 tbbmalloc.dll 03/12/2024 11:54 AM 214,912 tbbmalloc_debug.dll 03/12/2024 11:54 AM 107,392 tbbmalloc_proxy.dll 03/12/2024 11:54 AM 56,192 tbbmalloc_proxy_debug.dll 03/12/2024 11:54 AM 635,264 tbb_debug.dll 03/12/2024 11:54 AM 417,152 tbb_preview.dll 03/12/2024 11:54 AM 682,880 tbb_preview_debug.dll 03/12/2024 11:54 AM Tf 03/12/2024 11:54 AM Trace 03/12/2024 11:54 AM Ts 03/12/2024 11:54 AM Usd 03/12/2024 11:54 AM UsdGeom 03/12/2024 11:54 AM UsdHydra 03/12/2024 11:54 AM UsdLux 03/12/2024 11:54 AM UsdMedia 03/12/2024 11:54 AM UsdPhysics 03/12/2024 11:54 AM UsdProc 03/12/2024 11:54 AM UsdRender 03/12/2024 11:54 AM UsdRi 03/12/2024 11:54 AM UsdShade 03/12/2024 11:54 AM UsdSkel 03/12/2024 11:54 AM UsdUI 03/12/2024 11:54 AM UsdUtils 03/12/2024 11:54 AM UsdVol 03/12/2024 11:54 AM 217,600 usd_ar.dll 03/12/2024 11:54 AM 181,760 usd_arch.dll 03/12/2024 11:54 AM 573,952 usd_gf.dll 03/12/2024 11:54 AM 91,648 usd_js.dll 03/12/2024 11:54 AM 44,032 usd_kind.dll 03/12/2024 11:54 AM 170,496 usd_ndr.dll 03/12/2024 11:54 AM 1,266,176 usd_pcp.dll 03/12/2024 11:54 AM 236,544 usd_plug.dll 03/12/2024 11:54 AM 4,138,496 usd_sdf.dll 03/12/2024 11:54 AM 154,112 usd_sdr.dll 03/12/2024 11:54 AM 830,976 usd_tf.dll 03/12/2024 11:54 AM 274,944 usd_trace.dll 03/12/2024 11:54 AM 618,496 usd_ts.dll 03/12/2024 11:54 AM 4,781,568 usd_usd.dll 03/12/2024 11:54 AM 1,182,720 usd_usdGeom.dll 03/12/2024 11:54 AM 77,824 usd_usdHydra.dll 03/12/2024 11:54 AM 341,504 usd_usdLux.dll 03/12/2024 11:54 AM 79,872 usd_usdMedia.dll 03/12/2024 11:54 AM 280,576 usd_usdPhysics.dll 03/12/2024 11:54 AM 40,448 usd_usdProc.dll 03/12/2024 11:54 AM 139,776 usd_usdRender.dll 03/12/2024 11:54 AM 143,360 usd_usdRi.dll 03/12/2024 11:54 AM 573,440 usd_usdShade.dll 03/12/2024 11:54 AM 1,027,072 usd_usdSkel.dll 03/12/2024 11:54 AM 63,488 usd_usdUI.dll 03/12/2024 11:54 AM 711,168 usd_usdUtils.dll 03/12/2024 11:54 AM 89,088 usd_usdVol.dll 03/12/2024 11:54 AM 1,450,496 usd_vt.dll 03/12/2024 11:54 AM 30,208 usd_work.dll 03/12/2024 11:54 AM Vt 03/12/2024 11:54 AM Work 03/12/2024 11:54 AM 83,968 zlib.dll 03/12/2024 11:54 AM 1,008 init.py 03/12/2024 11:54 AM pycache 44 File(s) 23,258,864 bytes 31 Dir(s) 316,523,778,048 bytes free (venv) C:\Program Files\Python311\Lib\site-packages\pxr>` `PS C:\Users\dnelson3\AppData\Roaming\Python\Python311\site-packages> dir
Mode LastWriteTime Length Name d----- 3/14/2024 4:12 PM OpenGL PS C:\Users\dnelson3\AppData\Roaming\Python\Python311\site-packages>` Obliged for the assistance. Thanks, -David. |
@david-dot-nelson-2-at-sony-dot-com How did you build and install OpenUSD on your system? From your directory listing, it appears that none of the imaging components (including usdview) are present in your |
Sure thing. I have Autodesk and Houdini installed from their respective installers for USD on this system. I had installed OpenUSD previously with Python3.9 but ran into this error ( #3009 / #2996 ), which I got to run properly with PySide correction. But I hit issues with global environment variable conflicts with usd python versions with Python 3.9 and with Houdini. So I have attempted to correct my system, by removing Python 3.9 from PYTHONPATH and installing OpenUSD with only Python 3.11 in the Python path. Here's my steps on the latest install:
I am not sure where it is going wrong. Thanks for your help. -David. |
@sunyab Oh, SMH. It was right in my face. Somehow the Py 3.9 installation had covered the PYTHONPATH setup and removing it cleared the path when setting up Py 3.11 exclusively.
So I added And it works. I still have a viewer problem which I think still relates to #3009, and I think I will jump back to that for the PySide in Py 3.11 for correction. Thank you for your time! Cheers. -David. |
Glad you found a solution! Thanks for sharing the update :) |
Description of Issue/Steps to Reproduce
Hi, I was able to successfully build USD using the build script. And set the needed environment variables.
But when I run this command I get this error:
usdview extras/usd/tutorials/convertingLayerFormats/Sphere.usda
Traceback (most recent call last):
File "/usr/local/USD/bin/usdview", line 28, in
import pxr.Usdviewq as Usdviewq
ModuleNotFoundError: No module named 'pxr'
I checked to make sure /usr/local/USD/lib/python/pxr exists, and it does so maybe I didn't set my environment variables correctly? This is them:
$PATH=/usr/local/USD/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/snap/bin
$PYTHONPATH=/usr/local/USD/lib/python
They seemed right, so perhaps it is a compile error?
Package Versions/System Info
These are the specs I ran the build with:
Ubuntu 20.04
Python 3.8.10
gcc 9.4.0
cmake 3.16.3
PySide2 5.15.2.1
PyOpenGL 3.1.6
I know these aren't the tested specs but it's the only build I've successfully built on ubuntu.
It's also worth mentioning that I am attempting to do this via WSL on windows.
Anyone has an idea of where I can look for the issue?
Thank you!
The text was updated successfully, but these errors were encountered: