Skip to content

Commit f96f166

Browse files
committed
test=develop, refine doc
1 parent b612709 commit f96f166

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

paddle/scripts/fast_install.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,10 @@ function checkMacPython2(){
595595
else
596596
python_version=""
597597
fi
598+
check_python=`echo $python_version | grep "Python 2"`
598599
if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then
599600
python_version=""
600-
else
601+
elif [ -n "$check_python" ];then
601602
while true
602603
do
603604
read -p "
@@ -617,7 +618,10 @@ function checkMacPython2(){
617618
if [ "$use_python" == "y" ];then
618619
break
619620
fi
620-
fi
621+
else
622+
echo "您输入Python的不是Python2"
623+
python_version=""
624+
fi
621625
done
622626
}
623627

@@ -633,9 +637,10 @@ function checkMacPython3(){
633637
else
634638
python_version=""
635639
fi
640+
check_python=`echo $python_version | grep "Python 3"`
636641
if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then
637642
python_version=""
638-
else
643+
elif [ -n "$check_python" ] ;then
639644
while true
640645
do
641646
read -p "
@@ -655,7 +660,10 @@ function checkMacPython3(){
655660
if [ "$use_python" == "y" ];then
656661
break
657662
fi
658-
fi
663+
else
664+
echo "您输入Python的不是Python3"
665+
python_version=""
666+
fi
659667
done
660668
}
661669

@@ -697,7 +705,7 @@ function checkMacPythonVersion(){
697705
if [ "$python_V" == "" ];then
698706
python_V="2"
699707
fi
700-
read -n1 -p "您选择了数字【"$python_V"】,正在寻找符合您要求的Python版本,请按回车键继续..."
708+
echo "您选择了数字【"$python_V"】,正在寻找符合您要求的Python版本,请按回车键继续..."
701709
echo
702710
if [ "$python_V" == "2" ];then
703711
python_root=`which python2.7`
@@ -771,7 +779,6 @@ function checkMacPythonVersion(){
771779
uncode="m"
772780
fi
773781
fi
774-
echo ${python_list[@]}
775782
version_list=`echo "${python_list[@]}" | grep "$python_brief_version" `
776783
if [ "$version_list" != "" ];then
777784
break

0 commit comments

Comments
 (0)