From c1b598a79068d0a3e44a163bcce54916b4da0414 Mon Sep 17 00:00:00 2001 From: Jrohy Date: Sun, 17 Mar 2019 15:25:42 +0800 Subject: [PATCH] Add no pip install --- README.md | 6 ++++++ py3_install.sh | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 208372e..a23f35a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ bash <(curl -sL https://git.io/fhqMz) --latest ``` bash <(curl -sL https://git.io/fhqMz) -v 3.6.5 ``` + +## Only install python3 +``` +bash <(curl -sL https://git.io/fhqMz) --nopip +``` + find the special version in [python_version_list](https://www.python.org/ftp/python/), script will auto download and compile it if os openssl version less than **1.0.2** , script will auto install latest openssl before compile python3, it may be have risk(except new install os), so recommend install without compile way diff --git a/py3_install.sh b/py3_install.sh index 8f10f2e..7955f9f 100644 --- a/py3_install.sh +++ b/py3_install.sh @@ -10,6 +10,8 @@ OPENSSL_VERSION="1.1.1b" LATEST=0 +NO_PIP=0 + ORIGIN_PATH=$(pwd) # cancel centos alias @@ -28,8 +30,11 @@ colorEcho(){ #######get params######### while [[ $# > 0 ]];do - key="$1" - case $key in + KEY="$1" + case $KEY in + --nopip) + NO_PIP=1 + ;; --latest) LATEST=1 ;; @@ -163,7 +168,7 @@ main(){ webInstall fi # install latest pip - python3 <(curl -sL https://bootstrap.pypa.io/get-pip.py) + [[ $NO_PIP == 0 ]] && python3 <(curl -sL https://bootstrap.pypa.io/get-pip.py) } main \ No newline at end of file