%~dp0 can't handle path which include Space (#5274)
* %~dp0 can't handle path which include Space The default OpenVINO install directory is C:\\Program file(86)\\Intel\\..., which contains space. So when users run this script, the path is wrong. To handle this issue, I modify two part: one is the python_command, use a local var to store this path. The other is the errorlevel, just add double quotation marks * fix python_command path issue * delete unused blank line
This commit is contained in:
parent
a42ad606cb
commit
9488bb0b00
@ -70,7 +70,7 @@ IF /I "%1%" EQU "" (
|
|||||||
pip3 install --user -r ..\requirements%postfix%.txt
|
pip3 install --user -r ..\requirements%postfix%.txt
|
||||||
|
|
||||||
:: Chek MO version
|
:: Chek MO version
|
||||||
set python_command='python %~dp0..\mo\utils\extract_release_version.py'
|
set python_command='python "%~dp0..\mo\utils\extract_release_version.py"'
|
||||||
FOR /F "delims=" %%i IN (%python_command%) DO set mo_release_version=%%i
|
FOR /F "delims=" %%i IN (%python_command%) DO set mo_release_version=%%i
|
||||||
IF "%mo_release_version%" == "None.None" (
|
IF "%mo_release_version%" == "None.None" (
|
||||||
set mo_is_custom="true"
|
set mo_is_custom="true"
|
||||||
@ -80,7 +80,7 @@ IF "%mo_release_version%" == "None.None" (
|
|||||||
|
|
||||||
:: Check if existing IE Python bindings satisfy requirements
|
:: Check if existing IE Python bindings satisfy requirements
|
||||||
set errorlevel=
|
set errorlevel=
|
||||||
python %~dp0..\mo\utils\find_ie_version.py
|
python "%~dp0..\mo\utils\find_ie_version.py"
|
||||||
IF %errorlevel% EQU 0 goto ie_search_end
|
IF %errorlevel% EQU 0 goto ie_search_end
|
||||||
|
|
||||||
:: Check if OV already installed via pip
|
:: Check if OV already installed via pip
|
||||||
@ -119,7 +119,7 @@ IF %errorlevel% NEQ 0 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
set errorlevel=
|
set errorlevel=
|
||||||
python %~dp0..\mo\utils\find_ie_version.py
|
python "%~dp0..\mo\utils\find_ie_version.py"
|
||||||
IF %errorlevel% EQU 0 goto ie_search_end
|
IF %errorlevel% EQU 0 goto ie_search_end
|
||||||
|
|
||||||
echo [ WARNING ] The installed OpenVINO ^(TM^) toolkit version %mo_release_version% does not work as expected. Uninstalling...
|
echo [ WARNING ] The installed OpenVINO ^(TM^) toolkit version %mo_release_version% does not work as expected. Uninstalling...
|
||||||
@ -137,7 +137,7 @@ IF %errorlevel% NEQ 0 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
set errorlevel=
|
set errorlevel=
|
||||||
python %~dp0..\mo\utils\find_ie_version.py
|
python "%~dp0..\mo\utils\find_ie_version.py"
|
||||||
IF %errorlevel% EQU 0 goto ie_search_end
|
IF %errorlevel% EQU 0 goto ie_search_end
|
||||||
|
|
||||||
echo [ WARNING ] The installed highest OpenVINO ^(TM^) toolkit version doesn't work as expected. Uninstalling...
|
echo [ WARNING ] The installed highest OpenVINO ^(TM^) toolkit version doesn't work as expected. Uninstalling...
|
||||||
|
Loading…
Reference in New Issue
Block a user