Skip to content

Commit

Permalink
fix python bug
Browse files Browse the repository at this point in the history
  • Loading branch information
No-Github committed Nov 22, 2023
1 parent 9ae0134 commit 0fb6eb3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion f8x
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ pip2_Check(){
which pip2 > /dev/null 2>&1
;;
esac
;;
*)
which pip2 > /dev/null 2>&1
;;
esac

if [ $? == 0 ]
Expand Down Expand Up @@ -778,6 +782,10 @@ Install_Switch4(){
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
;;
esac
;;
*)
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
;;
esac

}
Expand All @@ -795,6 +803,10 @@ Install_Switch5(){
python3 -m pip install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
;;
esac
;;
*)
python3 -m pip install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
;;
esac

}
Expand All @@ -811,6 +823,10 @@ Install_Switch6(){
python3 -m pip install -r $1 > /dev/null 2>&1
;;
esac
;;
*)
python3 -m pip install -r $1 > /dev/null 2>&1
;;
esac

}
Expand All @@ -827,6 +843,10 @@ Install_Switch7(){
pip3 install -r $1 > /dev/null 2>&1
;;
esac
;;
*)
pip3 install -r $1 > /dev/null 2>&1
;;
esac

}
Expand Down Expand Up @@ -6971,7 +6991,6 @@ pip2_Install(){

echo -e "\033[1;33m\n>> Installing pip2\n\033[0m"


case $Linux_Version in
*"Debian"*)
case $Linux_Version_Num in
Expand All @@ -6985,6 +7004,12 @@ pip2_Install(){
rm -f get-pip.py > /dev/null 2>&1
;;
esac
;;
*)
cd $T_Dir && $Proxy_OK curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py > /dev/null 2>&1 || Echo_ERROR "https://bootstrap.pypa.io/get-pip.py download failed, please check if the network is reachable, proxychains4 configuration is correct"
$Proxy_OK python2 get-pip.py > /dev/null 2>&1 && Echo_INFOR "Successfully installed python-pip" || Echo_ERROR "python-pip installation failed"
rm -f get-pip.py > /dev/null 2>&1
;;
esac

Install_Switch3 "setuptools"
Expand Down

0 comments on commit 0fb6eb3

Please sign in to comment.