不要动现有的python2环境!
不要动现有的python2环境!
不要动现有的python2环境!
默认yum好用
默认环境不全
1. 安装环境
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 gcc
yum -y install gcc-c++
2.安装包
3.安装
将安装包上传至/DATA/py目录
tar xf 安装包
进入安装包目录
./configure --prefix=/opt/python34
make
make install
上述过程不报错,并数据success表示成功安装
可以进入bin目录 启动python3.4 测试
ln -s /opt/python34/bin/python3.4 /usr/local/bin/python3
建立软连接,以后在任意位置就可以通过python3来运行python程序
ln -s /opt/pyhon37/bin/pip3 /usr/local/bin/pip3
用来使用pip3的