首页 > 编程语言 > 详细

linux的安装3.7python

时间:2019-08-01 23:40:06      阅读:172      评论:0      收藏:0      [点我收藏+]
centos安装python3
1) 首先安装依赖包

    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel

2) 下载python3安装包

    [root@python tools]# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

3) 解压

    [root@python tools]# tar xvzf Python-3.7.4.tgz 

4) 创建文件夹把python3安装在里面

[root@python tools]# mkdir -p /usr/local/python3
[root@python tools]# cd Python-3.7.4
[root@python Python-3.7.4]# ./configure --prefix=/usr/local/python3/
[root@python Python-3.7.4]# make && make install

5) 建立软连接

[root@python Python-3.7.4]# ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
[root@python Python-3.7.4]# ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3

6) 验证和测试

[root@python Python-3.7.4]# python3
Python 3.7.4 (default, Jul 26 2019, 04:16:54) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

linux的安装3.7python

原文:https://blog.51cto.com/scajy/2425783

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!