diff --git a/run.bat b/run.bat index bef17e97a0affe52532dec5ef46125a79a5c356f..d71da82546cedfa8185ff95bfa87636ab479006d 100644 --- a/run.bat +++ b/run.bat @@ -37,6 +37,12 @@ python -c "import pip" goto:eof ) +python -c "import easy_install" +@if errorlevel 1 ( + @echo "Please install setuptools first!" + goto:eof +) + if not exist %TOOLS% ( @echo "no %TOOLS% directory exist" goto:eof @@ -47,7 +53,7 @@ python -m pip uninstall -y xdevice-extension python -m pip uninstall -y xdevice-ohos for %%a in (%TOOLS%/*.egg) do ( - python -m pip install --user %TOOLS%/%%a + python -m easy_install --user %TOOLS%/%%a @if errorlevel 1 ( @echo "Error occurs to install %%a!" ) diff --git a/run.sh b/run.sh index c9c34cd1eed76462fb35f68ce5065a4027c15e99..e673cf6cdf3144f9bd797192e014f6a917d1655f 100755 --- a/run.sh +++ b/run.sh @@ -33,6 +33,7 @@ $PYTHON -c 'import sys; exit(1) if sys.version_info.major < 3 or sys.version_inf error "Python3.7 or higher version required!" cd $(dirname "$0") || error "Failure to change direcory!" $PYTHON -c "import pip" || error "Please install pip first!" +$PYTHON -c "import easy_install" || error "Please install setuptools first!" if [ ! -d $TOOLS ]; then error "$TOOLS directory not exists" @@ -47,7 +48,7 @@ do if [ ! -e "$f" ]; then error "Can not find xdevice package!" fi - $PYTHON -m pip install --user "$f" || echo "Error occurs to install $f!" + $PYTHON -m easy_install --user "$f" || echo "Error occurs to install $f!" done for f in "$TOOLS"/*.tar.gz