乐趣区

关于python:Python3-安装及常用包安装

一、装置 Python3

1、装置依赖包

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、下载并解压 Python3 安装包

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、装置罕用模块

**# 装置 kafka 模块 **
pip3 install kafka-python

**# 装置 ES 模块 **
pip3 install elasticsearch
退出移动版