程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Linux uses shell script to deploy Python automation environment

編輯:Python

newly build shell file ,installPython.sh

/bin/rm -fr /usr/local/python3
wget https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1j.tar.gz --no-check-certificate
tar xf openssl-1.1.1j.tar.gz
cd openssl-1.1.1j
./config --prefix=/usr/local/openssl-1.1.1j
make && make install
echo "/usr/local/openssl-1.1.1j/lib/" >/etc/ld.so.conf.d/openssl.conf
ldconfig
yum -y install libffi-devel
yum -y install zlib
yum -y install zlib-devel
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -zxvf Python-3.7.0.tgz
cd Python-3.7.0
./configure prefix=/usr/local/python3 --with-openssl=/usr/local/openssl-1.1.1j
make && make install
/usr/local/python3/bin/python3 -V
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
/usr/local/python3/bin/python3 /opt/get-pip.py
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ pyaml==19.12.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ pycparser==2.19
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ PyGithub==1.45
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ PyJWT==1.7.1
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ pymongo==3.10.1
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ PyMySQL==0.9.3
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ smmap2==2.0.5
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ soupsieve==2.0.1
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ texttable==1.6.2
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ urllib3==1.25.7
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ websocket-client==0.48.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ wrapt==1.11.2
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ xlrd==1.2.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ xlutils==2.0.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ xlwt==1.3.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ zipp==1.0.0
/usr/local/python3/bin/pip3 install -i https://mirrors.aliyun.com/pypi/simple/ pyautogui==0.9.52
yum -y install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false

Install... In the script python and pip It's all right ,

The following installation python rely on , You need to replace it with the dependent package you need .

function shell Script

sh installPyhton.sh


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved