系统环境centos 6.5<br>原python版本2.6.6<br>目标python版本3.5.1<br>1.下载python3.5<br>wget --no-check-certificate <br>2.解压文件 编译 安装<br> tar -xvzf Python-3.3.0.tgz<br> cd Python-3.3.0<br> ./configure --prefix=/home/python/soft_install/python3.3/<br> make<br> make install<br> 进入 安装目录下的bin目录,检查是否安装成功<br> ./python3.3 -V ---如果安装成功则会显示安装的版本号<br> 修改默认的python ,重新建立软链接<br> ln -s /home/python/soft_install/python3.3/bin/python3.3 /usr/bin/python<br><br>
The above is the detailed content of python2 upgraded to python3. For more information, please follow other related articles on the PHP Chinese website!