Skip to content

Commit b5279e1

Browse files
HanSur94claude
andcommitted
fix: set MATLABROOT env var for Engine install from temp copy
The MATLAB Engine setup.py walks up the directory tree to find the MATLAB root. When source is copied to %TEMP%, that relative path breaks with "installation is corrupted". Setting MATLABROOT tells setup.py exactly where MATLAB is. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c057fc0 commit b5279e1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

install.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ if %errorlevel% equ 0 (
258258
goto :install_mcp
259259
)
260260
echo Building and installing MATLAB Engine API...
261+
:: Set MATLABROOT so setup.py can find MATLAB (it normally walks up
262+
:: from its own directory, which breaks when copied to temp)
263+
set "MATLABROOT=!MATLAB_ROOT!"
261264
pip install "!ENGINE_TEMP!" --no-build-isolation --quiet 2>&1
262265
if !errorlevel! neq 0 (
263266
echo.

0 commit comments

Comments
 (0)