首页 > 代码库 > RHEL7.3安装python3.6.1

RHEL7.3安装python3.6.1

RHEL7.3 install python3.6.1 steps

1. download Python-3.6.1.tgz
2. tar -zxvf Python-3.6.1.tgz
3. yum install gcc openssl-devel python-devel openldap-devel mysql*
4. cd Python-3.6.1
5. ./configure&make&make install
6. python3 --version
7. pip3 --version

如果在使用pip3安装其他python库时报错,一般是系统缺少相应的rpm包导致。
解决方法:
1. yum install 缺失的rpm包
2. 进入Python-3.6.1源码包目录,重新make&make install
3. 再次使用pip3安装

Python3常用第三方库:
pip3 install pymysql (yum install mysql*)
pip3 install pyldap (yum install openldap-devel)

 

RHEL7.3安装python3.6.1