PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.14k stars 1.22k forks source link

ImportError when trying to run usdcompress #1559

Open safasofuoglu opened 3 years ago

safasofuoglu commented 3 years ago

On a clean build, usdcat runs fine, usdcompress fails.

PS C:\> usdcompress
Traceback (most recent call last):
  File "d:\dev\usdwin\bin\usdcompress", line 30, in <module>
    from pxr import UsdDraco
  File "d:\dev\usdwin\lib\python\pxr\UsdDraco\__init__.py", line 25, in <module>
    Tf.PreparePythonModule()
  File "d:\dev\usdwin\lib\python\pxr\Tf\__init__.py", line 88, in PreparePythonModule
    module = importlib.import_module(
  File "C:\Users\safas\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _usdDraco: The specified module could not be found.

Win10 19042.1083 Visual Studio 2019 Developer Command Prompt v16.9.4 Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 https://github.com/PixarAnimationStudios/USD/commit/e40995f6360f485512566fec5854b5f170784ff2

D:\dev\USD>python build_scripts\build_usd.py --draco "d:\dev\usdwin"

Building with settings:
  USD source directory          D:\dev\USD
  USD install directory         d:\dev\usdwin
  3rd-party source directory    d:\dev\usdwin\src
  3rd-party install directory   d:\dev\usdwin
  Build directory               d:\dev\usdwin\build
  CMake generator               Default
  CMake toolset                 Default
  Downloader                    curl

  Building                      Shared libraries
    Config                      Release
    Imaging                     On
      Ptex support:             Off
      OpenVDB support:          Off
      OpenImageIO support:      Off
      OpenColorIO support:      Off
      PRMan support:            Off
    UsdImaging                  On
      usdview:                  On
    Python support              On
      Python 3:                 On
    Documentation               Off
    Tests                       Off
    Examples                    On
    Tutorials                   On
    Tools                       On
    Alembic Plugin              Off
      HDF5 support:             Off
    Draco Plugin                On
    MaterialX Plugin            Off

  Dependencies                  zlib, boost, TBB, Draco, OpenSubdiv
STATUS: Installing zlib...
STATUS: Installing boost...
STATUS: Installing TBB...
STATUS: Installing Draco...
STATUS: Installing OpenSubdiv...
STATUS: Installing USD...

Success! To use USD, please ensure that you have:

    The following in your PYTHONPATH environment variable:
    d:\dev\usdwin\lib\python

    The following in your PATH environment variable:
    d:\dev\usdwin\bin
    d:\dev\usdwin\lib
spiffmon commented 3 years ago

Hello @safasofuoglu , I suspect this may be because you are using python 3.9 on windows. Issue #1404 is fixed in the forthcoming USD 21.08 release - can you try again there when it comes out shortly (or in the dev branch if you don't want to wait)?

safasofuoglu commented 3 years ago

Hi @spiffmon , as I specified in the report, I built from https://github.com/PixarAnimationStudios/USD/commit/e40995f6360f485512566fec5854b5f170784ff2 and usdcat runs fine.

I'm claiming #1404 may not have fixed usdcompress.

spiffmon commented 3 years ago

Ah thanks… this may then be due to usdDraco being a plugin rather than a lib. This came up before but I don’t recall whether there was a resolution or not. We’ll try to take a look, but I can’t promise timing.

On Tue, Jul 13, 2021 at 4:31 PM safasofuoglu @.***> wrote:

Hi @spiffmon https://github.com/spiffmon , as I specified in the report, I built from e40995f https://github.com/PixarAnimationStudios/USD/commit/e40995f6360f485512566fec5854b5f170784ff2 and usdcat runs fine.

I'm claiming #1404 https://github.com/PixarAnimationStudios/USD/issues/1404 may not have fixed usdcompress.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/PixarAnimationStudios/USD/issues/1559#issuecomment-879471611, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPOU2AQJCIZMCDJ4Z2YCSLTXTEDLANCNFSM5AJS66PA .

-- --spiffiPhone

jilliene commented 3 years ago

Filed as internal issue #USD-6787

c64kernal commented 3 years ago

Hi @safasofuoglu -- I suspect @spiffmon is right. I suspect the issue is that none of the usdDraco symbols are exported and that is only surfacing as a problem on Windows.