Skip to content

Commit

Permalink
tools: add find pyenv path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Aug 12, 2024
1 parent 5090166 commit 6e65a2d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/msvs/find_python.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ for %%k in ( "HKCU\Software", "HKLM\SOFTWARE", "HKLM\Software\Wow6432Node") do (
if not errorlevel 1 goto :found-python
)

:: Check for pyenv-win installation using pyenv which python
for /f "tokens=*" %%i in ('pyenv which python 2^>nul') do set p=%%i
if defined p (
for /f "tokens=*" %%j in ('"%p%" --version') do set python_version=%%j
echo Python found at: %p%
echo Python version: %python_version%
goto :found-python
)

goto :no-python


Expand Down

0 comments on commit 6e65a2d

Please sign in to comment.