码迷,mamicode.com
首页 > 编程语言 > 详细

安装python3.7

时间:2019-07-15 13:35:15      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:tps   连接   安装包   sqli   readline   装包   read   更新   www   

首先安装依赖包,centos里面是-devel,如果在ubuntu下安装则要改成-dev,依赖包缺一不可,一步一步复制到终端执行就可以!

sudo yum -y groupinstall "Development tools"
sudo 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

然后下载python3.7的安装包(目前更新到了python3.7.3)

wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz

解压下载包

tar -xvJf  Python-3.7.3.tar.xz

编译安装

cd Python-3.7.3
./configure --prefix=/usr/local/bin/python3
sudo make
sudo make install

创建软连接

ln -s /usr/local/bin/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/bin/python3/bin/pip3 /usr/bin/pip3

最后输入命令python3 --version检查一下是否安装成功

安装python3.7

标签:tps   连接   安装包   sqli   readline   装包   read   更新   www   

原文地址:https://www.cnblogs.com/kcxg/p/11188247.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!