Skip to content

Commit 6e65a2d

Browse files
tools: add find pyenv path on windows
1 parent 5090166 commit 6e65a2d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/msvs/find_python.cmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ for %%k in ( "HKCU\Software", "HKLM\SOFTWARE", "HKLM\Software\Wow6432Node") do (
1717
if not errorlevel 1 goto :found-python
1818
)
1919

20+
:: Check for pyenv-win installation using pyenv which python
21+
for /f "tokens=*" %%i in ('pyenv which python 2^>nul') do set p=%%i
22+
if defined p (
23+
for /f "tokens=*" %%j in ('"%p%" --version') do set python_version=%%j
24+
echo Python found at: %p%
25+
echo Python version: %python_version%
26+
goto :found-python
27+
)
28+
2029
goto :no-python
2130

2231

0 commit comments

Comments
 (0)