mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
Update install-n.bat
Pulls \libs\ from wherever python is installed using the sys.base_prefix variable. Got tired of the batch file exiting bc i have python in c:\python311
This commit is contained in:
parent
2250b6be5f
commit
9cec3e1745
@ -95,7 +95,20 @@ git clone https://github.com/styler00dollar/ComfyUI-deepcache.git --quiet
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo :: %time:~0,8% :: - Copying python libs
|
echo :: %time:~0,8% :: - Copying python libs
|
||||||
xcopy /E /I /Y "%LocalAppData%\Programs\Python\Python3%PY_MINOR%\libs" "venv\libs"
|
FOR /F "tokens=* delims=" %%i IN ('python -c "import sys; print(f'{sys.base_prefix}\\libs')"') DO (
|
||||||
|
SET "PYTHON_LIBS_PATH=%%i"
|
||||||
|
)
|
||||||
|
if exist "%PYTHON_LIBS_PATH%\" (
|
||||||
|
echo Found Python libs path via sys.base_prefix: !PYTHON_LIBS_PATH!
|
||||||
|
) else (
|
||||||
|
echo Path not found via sys.base_prefix.
|
||||||
|
|
||||||
|
REM Construct and set the corrected fallback path.
|
||||||
|
SET "FALLBACK_PATH=%LocalAppData%\Programs\Python\Python3!PY_MINOR!\libs"
|
||||||
|
SET "PYTHON_LIBS_PATH=!FALLBACK_PATH!"
|
||||||
|
echo Using fallback path: !PYTHON_LIBS_PATH!
|
||||||
|
)
|
||||||
|
xcopy /E /I /Y "!PYTHON_LIBS_PATH!" "venv\libs"
|
||||||
set ERRLEVEL=%errorlevel%
|
set ERRLEVEL=%errorlevel%
|
||||||
if %ERRLEVEL% neq 0 (
|
if %ERRLEVEL% neq 0 (
|
||||||
echo "Failed to copy Python3%PY_MINOR%\libs to virtual environment."
|
echo "Failed to copy Python3%PY_MINOR%\libs to virtual environment."
|
||||||
@ -149,3 +162,4 @@ set MIOPEN_LOG_LEVEL=3
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user