python2 upgraded to python3

PHP中文网
Release: 2017-07-08 18:13:23
Original
1842 people have browsed it
系统环境centos 6.5
原python版本2.6.6
目标python版本3.5.1
1.下载python3.5
wget --no-check-certificate
2.解压文件 编译 安装
tar -xvzf Python-3.3.0.tgz
cd Python-3.3.0
./configure --prefix=/home/python/soft_install/python3.3/
make
make install
进入 安装目录下的bin目录,检查是否安装成功
./python3.3 -V ---如果安装成功则会显示安装的版本号
修改默认的python ,重新建立软链接
ln -s /home/python/soft_install/python3.3/bin/python3.3 /usr/bin/python

Copy after login

The above is the detailed content of python2 upgraded to python3. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!