在centos6.4下安装python3.5
作者:互联网
1、安装依赖包
./configure --prefix=/usr/local/python3.5 --enable-shared make && make install
yum groupinstall 'Development Tools'
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel -y
2、下载python3.5安装包
wget --no-check-certificate https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
3、解压安装包
tar -zxvf Python-3.5.0.tgz
4、安装python3.5
cd Python-3.5.0
./configure --prefix=/usr/local/python3
make && make install
echo 'export PATH=$PATH:/usr/local/python3/bin' >> ~/.bashrc
5、创建链接
ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3
cp -R /usr/local/python3.5/lib/* /usr/lib64/
6、测试安装是否成功
[root@h3 ~]# python3
Python 3.5.0 (default, Jan 25 2019, 11:18:20)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
标签:local,python3.5,devel,3.5,usr,centos6.4,安装,make 来源: https://www.cnblogs.com/hhaahh/p/10335579.html