linux保证成功安装python3.5
目录安装python所需的依赖两种方式下载python配置编译安装测试安装python所需的依赖yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-develyum -y install gcc两种方式下载python一种是去官网下载好后上传至虚拟机https://www.python
·
安装python所需的依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
yum -y install gcc
两种方式下载python
-
一种是去官网下载好后上传至虚拟机
https://www.python.org/ftp/python/ -
另一种就是利用wget命令安装
没安装的先安装
wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz
没镜像就是下载的慢
下载好了后进行解压
[root@spark01 python]# tar -xzvf Python-3.5.3.tgz
进入python目录下
配置编译安装
配置 ./configure
编译 make
编译,安装 make install
上述成功后将之前的旧的软连接删除
主要的命令如下:
cd /usr/bin
mv python python.backup
ln -s /usr/local/bin/python3.5 /usr/bin/python
ln -s /usr/local/bin/python3.5 /usr/bin/python3
rm -rf /usr/bin/python2
ln -s /usr/bin/python2.7 /usr/bin/python2
测试
更多推荐
已为社区贡献12条内容
所有评论(0)