微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在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、测试安装是否成功

[[email protected] ~]# python3Python 3.5.0 (default,Jan 25 2019,11:18:20) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linuxType "help","copyright","credits" or "license" for more information.>>>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。