Skip to content

Commit b0942a5

Browse files
syoyoclaude
andcommitted
Fix Windows DLL loading issue in Python verification
Add lib directory to PATH in Windows setup scripts to fix DLL loading. Problem: - Windows Python verification was failing with "DLL load failed" - The lteusd_ms.dll is located in dist-minsizerel-ms\lib\ - Windows needs DLLs to be in a directory that's in PATH Solution: - Update 05-setup-env.bat to include lib directory in PATH - Update 05-setup-env-minsizerel.bat to include lib directory in PATH - Now PATH includes both bin and lib directories Changes: - 05-setup-env.bat: Add %USD_INSTALL_DIR%\lib to PATH - 05-setup-env-minsizerel.bat: Add %USD_INSTALL_DIR%\lib to PATH This fixes the ImportError when running: python -c "from pxr import Usd; print(Usd.GetVersion())" Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 334b469 commit b0942a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

05-setup-env-minsizerel.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ if defined PYTHON_VERSION (
7878
REM Continue writing the script
7979
(
8080
echo.
81-
echo REM Set PATH
82-
echo set "PATH=%%USD_INSTALL_DIR%%\bin;%%PATH%%"
81+
echo REM Set PATH ^(include lib directory for DLLs^)
82+
echo set "PATH=%%USD_INSTALL_DIR%%\bin;%%USD_INSTALL_DIR%%\lib;%%PATH%%"
8383
echo if defined TBB_DIR set "PATH=%%TBB_DIR%%\bin;%%PATH%%"
8484
echo.
8585
echo REM Set PYTHONPATH
@@ -93,7 +93,7 @@ echo echo ========================================
9393
echo echo OpenUSD Environment Configured ^(MinSizeRel^)
9494
echo echo ========================================
9595
echo echo USD_INSTALL_DIR: %%USD_INSTALL_DIR%%
96-
echo echo PATH includes: %%USD_INSTALL_DIR%%\bin
96+
echo echo PATH includes: %%USD_INSTALL_DIR%%\bin and %%USD_INSTALL_DIR%%\lib
9797
echo if defined TBB_DIR echo TBB PATH includes: %%TBB_DIR%%\bin
9898
echo echo PYTHONPATH includes: %%USD_PYTHON_PATH%%
9999
echo echo ========================================

05-setup-env.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ if defined PYTHON_VERSION (
7070
REM Continue writing the script
7171
(
7272
echo.
73-
echo REM Set PATH
74-
echo set "PATH=%%USD_INSTALL_DIR%%\bin;%%TBB_DIR%%\bin;%%PATH%%"
73+
echo REM Set PATH ^(include lib directory for DLLs^)
74+
echo set "PATH=%%USD_INSTALL_DIR%%\bin;%%USD_INSTALL_DIR%%\lib;%%TBB_DIR%%\bin;%%PATH%%"
7575
echo.
7676
echo REM Set PYTHONPATH
7777
echo set "USD_PYTHON_PATH=%%USD_INSTALL_DIR%%\lib\python"
@@ -84,7 +84,7 @@ echo echo ========================================
8484
echo echo OpenUSD Environment Configured
8585
echo echo ========================================
8686
echo echo USD_INSTALL_DIR: %%USD_INSTALL_DIR%%
87-
echo echo PATH includes: %%USD_INSTALL_DIR%%\bin
87+
echo echo PATH includes: %%USD_INSTALL_DIR%%\bin and %%USD_INSTALL_DIR%%\lib
8888
echo echo TBB PATH includes: %%TBB_DIR%%\bin
8989
echo echo PYTHONPATH includes: %%USD_PYTHON_PATH%%
9090
echo echo ========================================

0 commit comments

Comments
 (0)