- 在官网下载python安装包(https://www.python.org/downloads/source/)
- 使用filezilla将下载好的压缩包上传到Linux文件夹下
- 解压文件夹
tar -xf 压缩包名
- 安装依赖 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 gcc
- 指定安装的路径
./configure --prefix=/usr/local/python3
安装在/usr/local/python3路径下 make
(很漫长)make install
- 创建软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
注意如果需要使用python 写MapReduce的话,需要每一个节点都要安装python呀。