From 883293f230da38f579f39c1c940633615e2774ff Mon Sep 17 00:00:00 2001 From: LexiconCode Date: Sat, 16 Oct 2021 11:09:24 -0500 Subject: [PATCH] utilized py launcher with explicit 3.8-32 python version --- Install_Caster_DNS-WSR.bat | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Install_Caster_DNS-WSR.bat b/Install_Caster_DNS-WSR.bat index 026874f39..9c1d1e54d 100644 --- a/Install_Caster_DNS-WSR.bat +++ b/Install_Caster_DNS-WSR.bat @@ -1,10 +1,28 @@ + @echo off + +SetLocal EnableDelayedExpansion +set python_version=3.8-32 set currentpath=%~dp0 echo Installation path: %currentpath% + +@REM execute python launcher for python directory +FOR /F "tokens=1 USEBACKQ delims=" %%i IN (`py -%python_version% -c "import sys; print(sys.exec_prefix)"`) DO ( set python_path=%%i ) + +@REM whack a funny trailing character (newline?) from end +set python_path=!python_path:~0,-1! + +set PATH=%python_path%;%python_path%/Scripts;%PATH% +echo %PATH% + +echo Next line should clearly state python version: +python --version + echo Using this python/pip: -python -m pip -V + +py -%python_version% -m pip install --upgrade pip echo Installing Caster Dependencies for DNS/WSR -python -m pip install -r "%currentpath%requirements.txt" +py -%python_version% -m pip install -r "%currentpath%requirements.txt" -pause 1 \ No newline at end of file +pause 1