@@ -134,6 +134,18 @@ async function isUVAvailable() {
134134 }
135135}
136136
137+ /**
138+ * Get UV executable path after installation
139+ * On Windows, UV is installed to %USERPROFILE%\.local\bin
140+ * On Unix/Linux/macOS, UV is installed to ~/.local/bin
141+ * @returns {string } Full path to UV executable
142+ */
143+ function getUVExecutablePath ( ) {
144+ const homeDir = process . env . USERPROFILE || process . env . HOME ;
145+ const uvExe = proc . IS_WINDOWS ? 'uv.exe' : 'uv' ;
146+ return path . join ( homeDir , '.local' , 'bin' , uvExe ) ;
147+ }
148+
137149/**
138150 * Install UV package manager using official installation scripts
139151 * Downloads and runs platform-specific installer from astral.sh
@@ -183,8 +195,15 @@ async function installPythonWithUV(destinationDir, pythonVersion = '3.13') {
183195 log ( 'info' , `Creating Python ${ pythonVersion } venv using UV` ) ;
184196
185197 // Ensure UV is available, install if necessary
198+ let uvCommand = 'uv' ;
186199 if ( ! ( await isUVAvailable ( ) ) ) {
187200 await installUV ( ) ;
201+ // On Windows, UV might not be in PATH immediately after installation
202+ // Use direct path to UV executable
203+ if ( proc . IS_WINDOWS ) {
204+ uvCommand = getUVExecutablePath ( ) ;
205+ log ( 'info' , `Using UV from: ${ uvCommand } ` ) ;
206+ }
188207 }
189208
190209 // Clean up any existing installation to avoid conflicts
@@ -200,7 +219,7 @@ async function installPythonWithUV(destinationDir, pythonVersion = '3.13') {
200219
201220 // Use --python-preference managed to allow UV to download Python if not found on system
202221 await execFile (
203- 'uv' ,
222+ uvCommand ,
204223 [
205224 'venv' ,
206225 absolutePath ,
0 commit comments