centos下python3.7安装

1.官网下载https://www.python.org/downloads/source/    下载最新版本Python-3.7.0b4.tgz

2.上传到centos服务器 运行 tar -zxvf Python-3.7.0b4.tgz 解压文件

3.cd Python-3.7.0b4  安装依赖包

yum -y groupinstall "Development tools"
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
3.7版本会出错需要安依赖包
yum install libffi-devel -y

4. 运行配置命令:./configure --prefix=/usr/local/python36 --enable-optimizations

5.运行安装命令:make && make install

6.建立软连接:

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

阅读更多
个人分类: python
上一篇NGINX location 在配置中的优先级
下一篇Python3 Socket网络编程-
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭