python3安装
1.安装依赖包
yum -y groupinstall 'Development Tools'
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
2.下载python3
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
3.安装编译
tar jxvf Python-3.5.0.tar.xz
cd Python-3.5.0
./configure --prefix=/usr/local/python3
make && make install
4.设置环境变量
echo 'export PATH=$PATH:/usr/local/python3/bin' >> ~/.bashrc
5.测试
重新登录,输入python3,并且安装路径里面有pip3,表示安装完整。
安装setuptools
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
tar -zxvf setuptools-19.6.tar.gz
cd setuptools-19.6.tar.gz
python3 setup.py build
python3 setup.py install
安装paramiko
git clone https://github.com/paramiko/paramiko.git
cd paramiko
python3 setup.py install
没有报错即安装成功!
安装django
pip3 install Django==1.10.2
如果提示pip版本过低,执行:python3 -m pip install --upgrade pip,在安装。