style: 修正脚本中的语法错误
This commit is contained in:
parent
87f2692768
commit
fa843d4333
@ -848,29 +848,37 @@ Install_Python_Lib(){
|
||||
fi
|
||||
|
||||
# 针对 Alpine Linux 系统的安装方式
|
||||
is_alpine=$(cat /etc/os-release | grep -i alpine)
|
||||
if [ "$is_alpine" != "" ];then
|
||||
apk update
|
||||
apk add python3 python3-dev py3-pip py3-psutil py3-gevent py3-openssl py3-paramiko py3-flask py3-rsa py3-requests py3-six py3-websocket-client
|
||||
|
||||
# 创建虚拟环境
|
||||
python3 -m venv $pyenv_path/pyenv
|
||||
source $pyenv_path/pyenv/bin/activate
|
||||
|
||||
pip install -U pip
|
||||
is_alpine=$(cat /etc/os-release | grep -i alpine)
|
||||
if [ "$is_alpine" != "" ];then
|
||||
apk update
|
||||
apk add build-base wget zlib-dev bzip2-dev openssl-dev ncurses-dev libffi-dev xz-dev
|
||||
|
||||
# 下载并编译 Python 3.7.16
|
||||
cd /usr/src
|
||||
wget https://www.python.org/ftp/python/3.7.16/Python-3.7.16.tar.xz
|
||||
tar xf Python-3.7.16.tar.xz
|
||||
cd Python-3.7.16
|
||||
./configure --enable-optimizations
|
||||
make altinstall
|
||||
|
||||
# 创建虚拟环境
|
||||
python3.7 -m venv $pyenv_path/pyenv
|
||||
source $pyenv_path/pyenv/bin/activate
|
||||
|
||||
pip install -U pip
|
||||
pip install Pillow psutil pyinotify pycryptodome upyun oss2 pymysql qrcode qiniu redis pymongo Cython configparser cos-python-sdk-v5 supervisor gevent-websocket pyopenssl
|
||||
pip install flask==1.1.4
|
||||
pip install Pillow psutil pyinotify pycryptodome upyun oss2 pymysql qrcode qiniu redis pymongo Cython configparser cos-python-sdk-v5 supervisor gevent-websocket pyopenssl
|
||||
pip install Pillow -U
|
||||
|
||||
pyenv_bin=$pyenv_path/pyenv/bin
|
||||
mkdir -p $pyenv_bin
|
||||
ln -sf $pyenv_bin/pip3 /usr/bin/btpip
|
||||
ln -sf $pyenv_bin/python3 /usr/bin/btpython
|
||||
|
||||
echo > $pyenv_bin/activate
|
||||
|
||||
return
|
||||
fi
|
||||
pip install Pillow -U
|
||||
|
||||
pyenv_bin=$pyenv_path/pyenv/bin
|
||||
mkdir -p $pyenv_bin
|
||||
ln -sf $pyenv_bin/pip3.7 /usr/bin/btpip
|
||||
ln -sf $pyenv_bin/python3.7 /usr/bin/btpython
|
||||
|
||||
echo > $pyenv_bin/activate
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
py_version="3.7.16"
|
||||
mkdir -p $pyenv_path
|
||||
@ -1492,3 +1500,5 @@ fi
|
||||
if [ "${INSTALL_DATE}" ];then
|
||||
curl -sS --connect-timeout 3 -m 3 --request POST --url "https://www.bt.cn/Api/installationCount" --data "date=${INSTALL_DATE}" --data "status=1" --data "ip=${getIpAddress}" > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user