PrismPipeline / QuiltiX

QuiltiX is a graphical node editor to edit, and author MaterialX based materials of 3D assets
https://pypi.org/project/QuiltiX
Apache License 2.0
263 stars 28 forks source link

Python version in standalone? #25

Closed melMass closed 1 year ago

melMass commented 1 year ago

Hi,

I'm trying to use the prebuilt wheels (OpenUSD and MaterialX) on Windows 11 with Python 10.11, but when I try to run QuiltiX I get the following trace:

Traceback ```console ❯ python -m QuiltiX Traceback (most recent call last): File "C:\Users\User\.pyenv\pyenv-win\versions\3.10.11\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\User\.dot\.venv\lib\site-packages\QuiltiX\__main__.py", line 1, in from . import quiltix File "C:\Users\User\.dot\.venv\lib\site-packages\QuiltiX\quiltix.py", line 28, in from pxr import UsdShade, Usd File "C:\Users\User\.dot\.venv\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs) File "C:\Users\User\.dot\.venv\lib\site-packages\pxr\UsdShade\__init__.py", line 24, in from pxr import Tf File "C:\Users\User\.dot\.venv\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs) File "C:\Users\User\.dot\.venv\lib\site-packages\pxr\Tf\__init__.py", line 163, in PreparePythonModule() File "C:\Users\User\.dot\.venv\lib\site-packages\pxr\Tf\__init__.py", line 88, in PreparePythonModule module = importlib.import_module( File "C:\Users\User\.pyenv\pyenv-win\versions\3.10.11\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed while importing _tf: The specified module could not be found. ```

I found this forum message over nvidia that suggest it could be an ABI issue or something not in PATH. Any help is appreciated

Thanks

melMass commented 1 year ago

I since downloaded the full prebuilt standalone that worked fine so I compared the files in pxr/Tf and it was matching. So I just tried to use a lower version virtual env (3.9.10) and it does load the dynamic library properly!

So I guess it could be specified for the instructions using PismPipeline prebuilds :)

heavyrain266 commented 1 year ago

I recommend you not to relly on pre-built versions of packages like OpenUSD. It will cause more issues than solve, since it has many compile-time options for specific environments which e.g. require support for MaterialX or bundled Hydra renderer.

Nvidia's builds of OpenUSD are outdated, and mainly configured to work with Python 3.7/3.8 for their Omniverse platform.

melMass commented 1 year ago

Thanks, I mostly use it in Houdini for now where it uses the libraries from SideFX but I wanted to try the standalone mode using the prebuilds from Prim no NVIDIA's, in Quiltix's readme it doesn't specify that they are only compatible with python 3.9

RichardFrangenberg commented 1 year ago

QuiltiX works with multiple Python versions, not only 3.9. But the prebuild USD version which you linked was build with Python 3.9. It's a good idea to mention the prebuild Python version in the repo. If you want to use QuiltiX with Python 3.10 you need to build your own USD version (or find a precompiled Python 3.10 USD build).