虚拟机中安装python3,redis,pip,celery

 

 

 

按照网上的提供的各种方式搞了半天也没在linux中安装成python3,后来自己研究了一下,使用一下简洁的方式安装

一,安装python3

  我的虚拟机linux版本是CentOS6.5,要安装的python版本是Python-3.5.0,使用root用户安装。

安装前先要安装必要的支持组件:

yum -y install zlib zlib-devel
yum -y install bzip2 bzip2-devel
yum -y install ncurses ncurses-devel
yum -y install readline readline-devel
yum -y install openssl openssl-devel
yum -y install openssl-static
yum -y install xz lzma xz-devel
yum -y install sqlite sqlite-devel
yum -y install gdbm gdbm-devel
yum -y install tk tk-devel
yum -y install libffi libffi-devel

1.直接下载,wget  https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz 

2.下载完毕后执行以下命令

tar -zxvf Python-3.5.0.tgz

cd Python-3.5.0

./configure

make && make install

3.查看版本

虚拟机中安装python3,redis,pip,celery

出现Python3.5.0表示成功

二,安装redis

1.使用root用户,进入/usr/local目录,执行如下命令,安装redis

 wget http://download.redis.io/releases/redis-2.8.17.tar.gz
 tar xzf redis-2.8.17.tar.gz
 cd redis-2.8.17
 make

2.启动redis服务

cd src 

./redis-server

虚拟机中安装python3,redis,pip,celery

3.启动客户端

./redis-cli

虚拟机中安装python3,redis,pip,celery

 

三,python版本大全

https://www.python.org/ftp/python

四,安装pip

1.执行命令:

wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
python3 get-pip.py

2.查看pip版本

虚拟机中安装python3,redis,pip,celery

五,安装celery

 pip install celery