编译安装 Python3.6.1

操作系统 centos7.2

说明:编译python3的过程是简单的但比较慢,可以用连字符 && ,让它自己去完成编译安装全过程

python版本 3.6.1 (最新版本是3.6.2 但是在make时陷入循环)

1.下载python3源码

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

2.解压

tar zxvf Python-3.6.1.tgz

3.配置编译参数 --耗时3min

cd Python-3.6.1

./configure --prefix=/opt/python --enable-optimizations

4.开始编译 --耗时40min

make

5.编译安装 --耗时3min

sudo make install

6.补充说明

(1)如果需要配置更多编译参数 可以使用 ./configure --help 查看

(2)make 命令也有一些选项 make clean 可以将编译结果清除

时间: 2024-11-08 06:08:12

编译安装 Python3.6.1的相关文章

CentOS7.3编译安装python3.6

CentOS7.3编译安装python3.6  一.前言  最近迷上了python,所以准备开始上手python.由于python2维护较少,python3必然是趋势了,所以我准备用python3.6学习python.CentOS7.3默认安装的是python2.7,所以我需要从官网上下载python3.6并编译安装python3.6,但是比较尴尬的是,CentOS的yum环境支持python2而不支持python3,所以需要通过一些小小的修改,才能在正常的使用python3.6的同时也能正常的

Python学习笔记-编译安装Python3.6.1 + iPython

由于系统已有2.6的python,最好不好修改系统的版本,使用编译安装 下载Python3.6.1包 wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz 安装依赖: yum -y install readline-devel 解压Python-3.6.1.tar.xz xz -d Python-3.6.1.tar.xztar -xvf Python-3.6.1.tar 编译安装,指定/usr/local/python3

Centos7手动编译安装Python3

Python3的安装方式非常的简单,首先去到Python下载目录下载想要的Python包,这里我选择了3.6.5版本 $ wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz --2018-06-26 07:38:46-- https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz Resolving www.python.org (www.python.org)... 1

ansible配合shell脚本批量编译安装python3.6.6

[[email protected]:/etc]# tree /etc/ansible/ /etc/ansible/ ├── ansible.cfg ├── hosts ├── python.yml └── roles └── python_install ├── files │   └── Python-3.6.6.tgz ├── tasks │   ├── copy.yml │   ├── install.yml │   └── main.yml └── templates └── pyth

Centos下编译安装python3

1 下载Python3源码包 wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz 2 安装Python3的依赖 首先我们要先下载Python3的所有依赖包,否则安装安装完后会出现各种问题 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline

CentOS 源码编译安装 Python3

准备 yum -y install wget gcc make libffi-devel zlib-devel readline-devel bzip2-devel ncurses-devel sqlite-devel gdbm-devel xz-devel tk-devel openssl-devel 说明: yum install wget gcc make readline-devel # 解决 import bz2 报错 yum install bzip2-devel # 解决 impo

CentOS7下编译安装Python3.7.x【亲测有效】

所有操作都在root用户下操作 下载安装包 编译安装 建立软链接 验证 安装: 更新yum: yum update 安装Python依赖: yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel zlib-devel ncurses-devel tk-devel libffi-devel gcc make 下载python安装包: 这是安装的是Python3.7.4 由于可能

Centos编译安装python3

1.2 安装python3的步骤 1.2.1下载python3源码包(安装文件放在opt文件中) wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz 1.2.2 下载python3编译的依赖包 yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel re

centos7.0编译安装python3.6.2

一.查看Linux系统版本信息 [[email protected] ~]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) [[email protected] ~]# uname -a Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [