centos7编译安装Python3所需要的库(模块)依赖

在centos中编译安装python3环境,第三方的库

实战的编辑环境:

1、VMware虚拟机

 

2、centos7

依赖包经过百度搜集以及之前安装Python3报错搜集(centos7反反复复安装,也体验了Ubuntu,Ubuntu可以直接使用apt-get编译安装比较方便)

依赖包清单如下:

# 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
-----------------------------------
#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
---------------------

以下包是编辑Python3报错“ImportError: No module named '_ctypes'”需要安装的依赖组件
#yum -y install gcc kernel-devel kenel-headers make bzip2
--------------------------
#yum -y install gcc gcc-c++ zlib zlib-devel libffi-devel

所以在编译Python3之前把上面组件都安装一遍,保证了Python3 可以顺利编译安装且自带安装了pip,不用另外麻烦编译安装。

centos7在安装以上依赖环境亲测可以顺利编译安装Python3 而且可以顺利编辑安装pip

posted @ 2018-04-08 09:26  Big_river  阅读(7731)  评论(0编辑  收藏  举报