Python3 installation and common package installation

Time:2021-2-22
1、 Install python3

1. Install dependency package

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel

2. Download and unzip the python 3 installation package

wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
tar -zxf Python-3.6.9.tgz
cd Python-3.6.9
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
python3 -V
pip3 -V

3. Install common modules

**#Install Kafka module**
pip3 install kafka-python

**#Installing es module**
pip3 install elasticsearch