Python学习之路 (一)开发环境搭建
前言
python3应该是Python的趋势所在,当然目前争议也比较大,这篇随笔的主要目的是记录在centos6.7下搭建python3环境的过程
以及碰到的问题和解决过程。
另外,如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境,
比如yum!!!!!
不要动现有的python2环境!
不要动现有的python2环境!
不要动现有的python2环境!
重要的使用说三遍!
安装python3.6
1、查看默认版本
查看当前CentOS-6.7系统默认的python版本
[hadoop@hadoop1 ~]$ python -V
Python 2.6.
[hadoop@hadoop1 ~]$
2、安装依赖环境
此处需要使用root用户进行安装
[root@hadoop1 hadoop]# 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
[root@hadoop1 hadoop]# 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
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Determining fastest mirrors
* base: mirrors.neusoft.edu.cn
* extras: mirrors.neusoft.edu.cn
* updates: mirror.bit.edu.cn
base | 3.7 kB :
extras | 3.4 kB :
extras/primary_db | kB :
updates | 3.4 kB :
updates/primary_db | 7.0 MB :
解决依赖关系
--> 执行事务检查
---> Package bzip2-devel.x86_64 :1.0.-.el6_0 will be 安装
---> Package db4-devel.x86_64 :4.7.-.el6_6 will be 升级
---> Package db4-devel.x86_64 :4.7.-.el6 will be an update
--> 处理依赖关系 db4-cxx = 4.7.-.el6,它被软件包 db4-devel-4.7.-.el6.x86_64 需要
--> 处理依赖关系 db4 = 4.7.-.el6,它被软件包 db4-devel-4.7.-.el6.x86_64 需要
---> Package gdbm-devel.x86_64 :1.8.-.el6 will be 升级
---> Package gdbm-devel.x86_64 :1.8.-.el6 will be an update
--> 处理依赖关系 gdbm = 1.8.-.el6,它被软件包 gdbm-devel-1.8.-.el6.x86_64 需要
---> Package libpcap-devel.x86_64 :1.4.-.20130826git2dbcaa1.el6 will be 安装
---> Package ncurses-devel.x86_64 :5.7-4.20090207.el6 will be 安装
---> Package openssl-devel.x86_64 :1.0.1e-.el6 will be 安装
--> 处理依赖关系 openssl = 1.0.1e-.el6,它被软件包 openssl-devel-1.0.1e-.el6.x86_64 需要
--> 处理依赖关系 krb5-devel,它被软件包 openssl-devel-1.0.1e-.el6.x86_64 需要
---> Package readline-devel.x86_64 :6.0-.el6 will be 安装
---> Package sqlite-devel.x86_64 :3.6.-.el6_7. will be 安装
--> 处理依赖关系 sqlite = 3.6.-.el6_7.,它被软件包 sqlite-devel-3.6.-.el6_7..x86_64 需要
---> Package tk-devel.x86_64 :8.5.-.el6 will be 安装
--> 处理依赖关系 tk = :8.5.-.el6,它被软件包 :tk-devel-8.5.-.el6.x86_64 需要
--> 处理依赖关系 tcl-devel = :8.5.,它被软件包 :tk-devel-8.5.-.el6.x86_64 需要
--> 处理依赖关系 libXft-devel,它被软件包 :tk-devel-8.5.-.el6.x86_64 需要
--> 处理依赖关系 libX11-devel,它被软件包 :tk-devel-8.5.-.el6.x86_64 需要
--> 处理依赖关系 libtk8..so()(64bit),它被软件包 :tk-devel-8.5.-.el6.x86_64 需要
---> Package xz-devel.x86_64 :4.999.-0.5.beta.20091007git.el6 will be 安装
---> Package zlib-devel.x86_64 :1.2.-.el6 will be 安装
--> 执行事务检查
---> Package db4.x86_64 :4.7.-.el6_6 will be 升级
--> 处理依赖关系 db4 = 4.7.-.el6_6,它被软件包 db4-utils-4.7.-.el6_6.x86_64 需要
---> Package db4.x86_64 :4.7.-.el6 will be an update
---> Package db4-cxx.x86_64 :4.7.-.el6_6 will be 升级
---> Package db4-cxx.x86_64 :4.7.-.el6 will be an update
---> Package gdbm.x86_64 :1.8.-.el6 will be 升级
---> Package gdbm.x86_64 :1.8.-.el6 will be an update
---> Package krb5-devel.x86_64 :1.10.-.el6 will be 安装
--> 处理依赖关系 libkadm5(x86-) = 1.10.-.el6,它被软件包 krb5-devel-1.10.-.el6.x86_64 需要
--> 处理依赖关系 krb5-libs = 1.10.-.el6,它被软件包 krb5-devel-1.10.-.el6.x86_64 需要
--> 处理依赖关系 libselinux-devel,它被软件包 krb5-devel-1.10.-.el6.x86_64 需要
--> 处理依赖关系 libcom_err-devel,它被软件包 krb5-devel-1.10.-.el6.x86_64 需要
--> 处理依赖关系 keyutils-libs-devel,它被软件包 krb5-devel-1.10.-.el6.x86_64 需要
---> Package libX11-devel.x86_64 :1.6.-.el6 will be 安装
--> 处理依赖关系 libX11 = 1.6.-.el6,它被软件包 libX11-devel-1.6.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(xcb) >= 1.11.,它被软件包 libX11-devel-1.6.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(xproto),它被软件包 libX11-devel-1.6.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(xcb),它被软件包 libX11-devel-1.6.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(kbproto),它被软件包 libX11-devel-1.6.-.el6.x86_64 需要
---> Package libXft-devel.x86_64 :2.3.-.el6 will be 安装
--> 处理依赖关系 libXft = 2.3.-.el6,它被软件包 libXft-devel-2.3.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(xrender),它被软件包 libXft-devel-2.3.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(freetype2),它被软件包 libXft-devel-2.3.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(fontconfig),它被软件包 libXft-devel-2.3.-.el6.x86_64 需要
---> Package openssl.x86_64 :1.0.1e-.el6 will be 升级
---> Package openssl.x86_64 :1.0.1e-.el6 will be an update
---> Package sqlite.x86_64 :3.6.-.el6 will be 升级
---> Package sqlite.x86_64 :3.6.-.el6_7. will be an update
---> Package tcl-devel.x86_64 :8.5.-.el6 will be 安装
--> 处理依赖关系 tcl = :8.5.-.el6,它被软件包 :tcl-devel-8.5.-.el6.x86_64 需要
--> 处理依赖关系 libtcl8..so()(64bit),它被软件包 :tcl-devel-8.5.-.el6.x86_64 需要
---> Package tk.x86_64 :8.5.-.el6 will be 安装
--> 执行事务检查
---> Package db4-utils.x86_64 :4.7.-.el6_6 will be 升级
---> Package db4-utils.x86_64 :4.7.-.el6 will be an update
---> Package fontconfig-devel.x86_64 :2.8.-.el6 will be 安装
---> Package freetype-devel.x86_64 :2.3.-.el6 will be 安装
--> 处理依赖关系 freetype = 2.3.-.el6,它被软件包 freetype-devel-2.3.-.el6.x86_64 需要
---> Package keyutils-libs-devel.x86_64 :1.4-.el6 will be 安装
---> Package krb5-libs.x86_64 :1.10.-.el6 will be 升级
--> 处理依赖关系 krb5-libs = 1.10.-.el6,它被软件包 krb5-workstation-1.10.-.el6.x86_64 需要
---> Package krb5-libs.x86_64 :1.10.-.el6 will be an update
---> Package libX11.x86_64 :1.6.-.el6 will be 升级
---> Package libX11.x86_64 :1.6.-.el6 will be an update
--> 处理依赖关系 libX11-common = 1.6.-.el6,它被软件包 libX11-1.6.-.el6.x86_64 需要
---> Package libXft.x86_64 :2.3.-.el6 will be 升级
---> Package libXft.x86_64 :2.3.-.el6 will be an update
---> Package libXrender-devel.x86_64 :0.9.-.el6 will be 安装
--> 处理依赖关系 libXrender = 0.9.-.el6,它被软件包 libXrender-devel-0.9.-.el6.x86_64 需要
---> Package libcom_err-devel.x86_64 :1.41.-.el6 will be 安装
--> 处理依赖关系 libcom_err = 1.41.-.el6,它被软件包 libcom_err-devel-1.41.-.el6.x86_64 需要
---> Package libkadm5.x86_64 :1.10.-.el6 will be 安装
---> Package libselinux-devel.x86_64 :2.0.-.el6 will be 安装
--> 处理依赖关系 libselinux = 2.0.-.el6,它被软件包 libselinux-devel-2.0.-.el6.x86_64 需要
--> 处理依赖关系 libsepol-devel >= 2.0.-,它被软件包 libselinux-devel-2.0.-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(libsepol),它被软件包 libselinux-devel-2.0.-.el6.x86_64 需要
---> Package libxcb-devel.x86_64 :1.12-.el6 will be 安装
--> 处理依赖关系 libxcb = 1.12-.el6,它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 pkgconfig(xau) >= 0.99.,它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 libxcb-xkb.so.()(64bit),它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 libxcb-xinput.so.()(64bit),它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 libxcb-sync.so.()(64bit),它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 libxcb-present.so.()(64bit),它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
--> 处理依赖关系 libxcb-dri3.so.()(64bit),它被软件包 libxcb-devel-1.12-.el6.x86_64 需要
---> Package tcl.x86_64 :8.5.-.el6 will be 安装
---> Package xorg-x11-proto-devel.noarch :7.7-.el6 will be 安装
--> 执行事务检查
---> Package freetype.x86_64 :2.3.-.el6_6. will be 升级
---> Package freetype.x86_64 :2.3.-.el6 will be an update
---> Package krb5-workstation.x86_64 :1.10.-.el6 will be 升级
---> Package krb5-workstation.x86_64 :1.10.-.el6 will be an update
---> Package libX11-common.noarch :1.6.-.el6 will be 升级
---> Package libX11-common.noarch :1.6.-.el6 will be an update
---> Package libXau-devel.x86_64 :1.0.-.el6 will be 安装
---> Package libXrender.x86_64 :0.9.-2.1.el6 will be 升级
---> Package libXrender.x86_64 :0.9.-.el6 will be an update
---> Package libcom_err.x86_64 :1.41.-.el6 will be 升级
--> 处理依赖关系 libcom_err = 1.41.-.el6,它被软件包 libss-1.41.-.el6.x86_64 需要
--> 处理依赖关系 libcom_err = 1.41.-.el6,它被软件包 e2fsprogs-libs-1.41.-.el6.x86_64 需要
--> 处理依赖关系 libcom_err = 1.41.-.el6,它被软件包 e2fsprogs-1.41.-.el6.x86_64 需要
---> Package libcom_err.x86_64 :1.41.-.el6 will be an update
---> Package libselinux.x86_64 :2.0.-5.8.el6 will be 升级
--> 处理依赖关系 libselinux = 2.0.-5.8.el6,它被软件包 libselinux-utils-2.0.-5.8.el6.x86_64 需要
--> 处理依赖关系 libselinux = 2.0.-5.8.el6,它被软件包 libselinux-python-2.0.-5.8.el6.x86_64 需要
---> Package libselinux.x86_64 :2.0.-.el6 will be an update
---> Package libsepol-devel.x86_64 :2.0.-.el6 will be 安装
---> Package libxcb.x86_64 :1.9.-.el6 will be 升级
---> Package libxcb.x86_64 :1.12-.el6 will be an update
--> 执行事务检查
---> Package e2fsprogs.x86_64 :1.41.-.el6 will be 升级
---> Package e2fsprogs.x86_64 :1.41.-.el6 will be an update
---> Package e2fsprogs-libs.x86_64 :1.41.-.el6 will be 升级
---> Package e2fsprogs-libs.x86_64 :1.41.-.el6 will be an update
---> Package libselinux-python.x86_64 :2.0.-5.8.el6 will be 升级
---> Package libselinux-python.x86_64 :2.0.-.el6 will be an update
---> Package libselinux-utils.x86_64 :2.0.-5.8.el6 will be 升级
---> Package libselinux-utils.x86_64 :2.0.-.el6 will be an update
---> Package libss.x86_64 :1.41.-.el6 will be 升级
---> Package libss.x86_64 :1.41.-.el6 will be an update
--> 完成依赖关系计算 依赖关系解决 ================================================================================================================
软件包 架构 版本 仓库 大小
================================================================================================================
正在安装:
bzip2-devel x86_64 1.0.-.el6_0 base k
libpcap-devel x86_64 :1.4.-.20130826git2dbcaa1.el6 base k
ncurses-devel x86_64 5.7-4.20090207.el6 base k
openssl-devel x86_64 1.0.1e-.el6 base 1.2 M
readline-devel x86_64 6.0-.el6 base k
sqlite-devel x86_64 3.6.-.el6_7. base k
tk-devel x86_64 :8.5.-.el6 base k
xz-devel x86_64 4.999.-0.5.beta.20091007git.el6 base k
zlib-devel x86_64 1.2.-.el6 base k
正在升级:
db4-devel x86_64 4.7.-.el6 base 6.6 M
gdbm-devel x86_64 1.8.-.el6 base k
为依赖而安装:
fontconfig-devel x86_64 2.8.-.el6 base k
freetype-devel x86_64 2.3.-.el6 base k
keyutils-libs-devel x86_64 1.4-.el6 base k
krb5-devel x86_64 1.10.-.el6 base k
libX11-devel x86_64 1.6.-.el6 base k
libXau-devel x86_64 1.0.-.el6 base k
libXft-devel x86_64 2.3.-.el6 base k
libXrender-devel x86_64 0.9.-.el6 base k
libcom_err-devel x86_64 1.41.-.el6 base k
libkadm5 x86_64 1.10.-.el6 base k
libselinux-devel x86_64 2.0.-.el6 base k
libsepol-devel x86_64 2.0.-.el6 base k
libxcb-devel x86_64 1.12-.el6 base 1.1 M
tcl x86_64 :8.5.-.el6 base 1.9 M
tcl-devel x86_64 :8.5.-.el6 base k
tk x86_64 :8.5.-.el6 base 1.4 M
xorg-x11-proto-devel noarch 7.7-.el6 base k
为依赖而更新:
db4 x86_64 4.7.-.el6 base k
db4-cxx x86_64 4.7.-.el6 base k
db4-utils x86_64 4.7.-.el6 base k
e2fsprogs x86_64 1.41.-.el6 base k
e2fsprogs-libs x86_64 1.41.-.el6 base k
freetype x86_64 2.3.-.el6 base k
gdbm x86_64 1.8.-.el6 base k
krb5-libs x86_64 1.10.-.el6 base k
krb5-workstation x86_64 1.10.-.el6 base k
libX11 x86_64 1.6.-.el6 base k
libX11-common noarch 1.6.-.el6 base k
libXft x86_64 2.3.-.el6 base k
libXrender x86_64 0.9.-.el6 base k
libcom_err x86_64 1.41.-.el6 base k
libselinux x86_64 2.0.-.el6 base k
libselinux-python x86_64 2.0.-.el6 base k
libselinux-utils x86_64 2.0.-.el6 base k
libss x86_64 1.41.-.el6 base k
libxcb x86_64 1.12-.el6 base k
openssl x86_64 1.0.1e-.el6 base 1.5 M
sqlite x86_64 3.6.-.el6_7. base k 事务概要
================================================================================================================
Install Package(s)
Upgrade Package(s) 总下载量: M
下载软件包:
(/): bzip2-devel-1.0.-.el6_0.x86_64.rpm | kB :
(/): db4-4.7.-.el6.x86_64.rpm | kB :
(/): db4-cxx-4.7.-.el6.x86_64.rpm | kB :
(/): db4-devel-4.7.-.el6.x86_64.rpm | 6.6 MB :
(/): db4-utils-4.7.-.el6.x86_64.rpm | kB :
(/): e2fsprogs-1.41.-.el6.x86_64.rpm | kB :
(/): e2fsprogs-libs-1.41.-.el6.x86_64.rpm | kB :
(/): fontconfig-devel-2.8.-.el6.x86_64.rpm | kB :
(/): freetype-2.3.-.el6.x86_64.rpm | kB :
(/): freetype-devel-2.3.-.el6.x86_64.rpm | kB :
(/): gdbm-1.8.-.el6.x86_64.rpm | kB :
(/): gdbm-devel-1.8.-.el6.x86_64.rpm | kB :
(/): keyutils-libs-devel-1.4-.el6.x86_64.rpm | kB :
(/): krb5-devel-1.10.-.el6.x86_64.rpm | kB :
(/): krb5-libs-1.10.-.el6.x86_64.rpm | kB :
(/): krb5-workstation-1.10.-.el6.x86_64.rpm | kB :
(/): libX11-1.6.-.el6.x86_64.rpm | kB :
(/): libX11-common-1.6.-.el6.noarch.rpm | kB :
(/): libX11-devel-1.6.-.el6.x86_64.rpm | kB :
(/): libXau-devel-1.0.-.el6.x86_64.rpm | kB :
(/): libXft-2.3.-.el6.x86_64.rpm | kB :
(/): libXft-devel-2.3.-.el6.x86_64.rpm | kB :
(/): libXrender-0.9.-.el6.x86_64.rpm | kB :
(/): libXrender-devel-0.9.-.el6.x86_64.rpm | kB :
(/): libcom_err-1.41.-.el6.x86_64.rpm | kB :
(/): libcom_err-devel-1.41.-.el6.x86_64.rpm | kB :
(/): libkadm5-1.10.-.el6.x86_64.rpm | kB :
(/): libpcap-devel-1.4.-.20130826git2dbcaa1.el6.x86_64.rpm | kB :
(/): libselinux-2.0.-.el6.x86_64.rpm | kB :
(/): libselinux-devel-2.0.-.el6.x86_64.rpm | kB :
(/): libselinux-python-2.0.-.el6.x86_64.rpm | kB :
(/): libselinux-utils-2.0.-.el6.x86_64.rpm | kB :
(/): libsepol-devel-2.0.-.el6.x86_64.rpm | kB :
(/): libss-1.41.-.el6.x86_64.rpm | kB :
(/): libxcb-1.12-.el6.x86_64.rpm | kB :
(/): libxcb-devel-1.12-.el6.x86_64.rpm | 1.1 MB :
(/): ncurses-devel-5.7-4.20090207.el6.x86_64.rpm | kB :
(/): openssl-1.0.1e-.el6.x86_64.rpm | 1.5 MB :
(/): openssl-devel-1.0.1e-.el6.x86_64.rpm | 1.2 MB :
(/): readline-devel-6.0-.el6.x86_64.rpm | kB :
(/): sqlite-3.6.-.el6_7..x86_64.rpm | kB :
(/): sqlite-devel-3.6.-.el6_7..x86_64.rpm | kB :
(/): tcl-8.5.-.el6.x86_64.rpm | 1.9 MB :
(/): tcl-devel-8.5.-.el6.x86_64.rpm | kB :
(/): tk-8.5.-.el6.x86_64.rpm | 1.4 MB :
(/): tk-devel-8.5.-.el6.x86_64.rpm | kB :
(/): xorg-x11-proto-devel-7.7-.el6.noarch.rpm | kB :
(/): xz-devel-4.999.-0.5.beta.20091007git.el6.x86_64.rpm | kB :
(/): zlib-devel-1.2.-.el6.x86_64.rpm | kB :
----------------------------------------------------------------------------------------------------------------
总计 kB/s | MB :
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS- Key (CentOS Official Signing Key) <centos--key@centos.org>
Package: centos-release--.el6.centos.12.3.x86_64 (@anaconda-CentOS-.x86_64/6.7)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在升级 : libcom_err-1.41.-.el6.x86_64 /
正在升级 : libselinux-2.0.-.el6.x86_64 /
正在升级 : krb5-libs-1.10.-.el6.x86_64 /
正在安装 : xorg-x11-proto-devel-7.7-.el6.noarch /
正在升级 : freetype-2.3.-.el6.x86_64 /
正在安装 : libkadm5-1.10.-.el6.x86_64 /
正在升级 : libss-1.41.-.el6.x86_64 /
正在安装 : :tcl-8.5.-.el6.x86_64 /
正在升级 : db4-4.7.-.el6.x86_64 /
正在升级 : libxcb-1.12-.el6.x86_64 /
正在安装 : zlib-devel-1.2.-.el6.x86_64 /
正在安装 : freetype-devel-2.3.-.el6.x86_64 /
正在安装 : fontconfig-devel-2.8.-.el6.x86_64 /
正在安装 : :tcl-devel-8.5.-.el6.x86_64 /
正在安装 : libXau-devel-1.0.-.el6.x86_64 /
正在安装 : libxcb-devel-1.12-.el6.x86_64 /
正在升级 : openssl-1.0.1e-.el6.x86_64 /
正在升级 : e2fsprogs-libs-1.41.-.el6.x86_64 /
正在安装 : libcom_err-devel-1.41.-.el6.x86_64 /
正在安装 : libsepol-devel-2.0.-.el6.x86_64 /
正在安装 : libselinux-devel-2.0.-.el6.x86_64 /
正在升级 : db4-cxx-4.7.-.el6.x86_64 /
正在安装 : ncurses-devel-5.7-4.20090207.el6.x86_64 /
正在升级 : libX11-common-1.6.-.el6.noarch /
正在升级 : libX11-1.6.-.el6.x86_64 /
正在升级 : libXrender-0.9.-.el6.x86_64 /
正在升级 : libXft-2.3.-.el6.x86_64 /
正在安装 : libX11-devel-1.6.-.el6.x86_64 /
正在安装 : libXrender-devel-0.9.-.el6.x86_64 /
正在安装 : libXft-devel-2.3.-.el6.x86_64 /
正在安装 : :tk-8.5.-.el6.x86_64 /
正在升级 : sqlite-3.6.-.el6_7..x86_64 /
正在安装 : keyutils-libs-devel-1.4-.el6.x86_64 /
正在安装 : krb5-devel-1.10.-.el6.x86_64 /
正在升级 : gdbm-1.8.-.el6.x86_64 /
正在升级 : gdbm-devel-1.8.-.el6.x86_64 /
正在安装 : openssl-devel-1.0.1e-.el6.x86_64 /
正在安装 : sqlite-devel-3.6.-.el6_7..x86_64 /
正在安装 : :tk-devel-8.5.-.el6.x86_64 /
正在安装 : readline-devel-6.0-.el6.x86_64 /
正在升级 : db4-devel-4.7.-.el6.x86_64 /
正在升级 : e2fsprogs-1.41.-.el6.x86_64 /
正在升级 : db4-utils-4.7.-.el6.x86_64 /
正在升级 : krb5-workstation-1.10.-.el6.x86_64 /
正在升级 : libselinux-python-2.0.-.el6.x86_64 /
正在升级 : libselinux-utils-2.0.-.el6.x86_64 /
正在安装 : :libpcap-devel-1.4.-.20130826git2dbcaa1.el6.x86_64 /
正在安装 : xz-devel-4.999.-0.5.beta.20091007git.el6.x86_64 /
正在安装 : bzip2-devel-1.0.-.el6_0.x86_64 /
清理 : krb5-workstation-1.10.-.el6.x86_64 /
清理 : db4-devel-4.7.-.el6_6.x86_64 /
清理 : e2fsprogs-1.41.-.el6.x86_64 /
清理 : libXft-2.3.-.el6.x86_64 /
清理 : gdbm-devel-1.8.-.el6.x86_64 /
清理 : openssl-1.0.1e-.el6.x86_64 /
清理 : krb5-libs-1.10.-.el6.x86_64 /
清理 : libXrender-0.9.-2.1.el6.x86_64 /
清理 : libX11-1.6.-.el6.x86_64 /
清理 : e2fsprogs-libs-1.41.-.el6.x86_64 /
清理 : libss-1.41.-.el6.x86_64 /
清理 : libselinux-utils-2.0.-5.8.el6.x86_64 /
清理 : libselinux-python-2.0.-5.8.el6.x86_64 /
清理 : db4-utils-4.7.-.el6_6.x86_64 /
清理 : libX11-common-1.6.-.el6.noarch /
清理 : db4-4.7.-.el6_6.x86_64 /
清理 : libselinux-2.0.-5.8.el6.x86_64 /
清理 : libcom_err-1.41.-.el6.x86_64 /
清理 : libxcb-1.9.-.el6.x86_64 /
清理 : gdbm-1.8.-.el6.x86_64 /
清理 : freetype-2.3.-.el6_6..x86_64 /
清理 : db4-cxx-4.7.-.el6_6.x86_64 /
清理 : sqlite-3.6.-.el6.x86_64 /
Verifying : readline-devel-6.0-.el6.x86_64 /
Verifying : libXft-devel-2.3.-.el6.x86_64 /
Verifying : libX11-devel-1.6.-.el6.x86_64 /
Verifying : e2fsprogs-1.41.-.el6.x86_64 /
Verifying : libX11-1.6.-.el6.x86_64 /
Verifying : krb5-devel-1.10.-.el6.x86_64 /
Verifying : krb5-libs-1.10.-.el6.x86_64 /
Verifying : libXft-2.3.-.el6.x86_64 /
Verifying : e2fsprogs-libs-1.41.-.el6.x86_64 /
Verifying : gdbm-1.8.-.el6.x86_64 /
Verifying : krb5-workstation-1.10.-.el6.x86_64 /
Verifying : freetype-devel-2.3.-.el6.x86_64 /
Verifying : bzip2-devel-1.0.-.el6_0.x86_64 /
Verifying : libss-1.41.-.el6.x86_64 /
Verifying : libXrender-0.9.-.el6.x86_64 /
Verifying : keyutils-libs-devel-1.4-.el6.x86_64 /
Verifying : libselinux-2.0.-.el6.x86_64 /
Verifying : libxcb-devel-1.12-.el6.x86_64 /
Verifying : zlib-devel-1.2.-.el6.x86_64 /
Verifying : sqlite-3.6.-.el6_7..x86_64 /
Verifying : libX11-common-1.6.-.el6.noarch /
Verifying : ncurses-devel-5.7-4.20090207.el6.x86_64 /
Verifying : gdbm-devel-1.8.-.el6.x86_64 /
Verifying : openssl-devel-1.0.1e-.el6.x86_64 /
Verifying : libcom_err-1.41.-.el6.x86_64 /
Verifying : :tk-devel-8.5.-.el6.x86_64 /
Verifying : libxcb-1.12-.el6.x86_64 /
Verifying : db4-cxx-4.7.-.el6.x86_64 /
Verifying : xz-devel-4.999.-0.5.beta.20091007git.el6.x86_64 /
Verifying : db4-4.7.-.el6.x86_64 /
Verifying : db4-devel-4.7.-.el6.x86_64 /
Verifying : xorg-x11-proto-devel-7.7-.el6.noarch /
Verifying : freetype-2.3.-.el6.x86_64 /
Verifying : db4-utils-4.7.-.el6.x86_64 /
Verifying : :libpcap-devel-1.4.-.20130826git2dbcaa1.el6.x86_64 /
Verifying : libselinux-python-2.0.-.el6.x86_64 /
Verifying : sqlite-devel-3.6.-.el6_7..x86_64 /
Verifying : libsepol-devel-2.0.-.el6.x86_64 /
Verifying : fontconfig-devel-2.8.-.el6.x86_64 /
Verifying : libselinux-utils-2.0.-.el6.x86_64 /
Verifying : openssl-1.0.1e-.el6.x86_64 /
Verifying : libkadm5-1.10.-.el6.x86_64 /
Verifying : libcom_err-devel-1.41.-.el6.x86_64 /
Verifying : :tcl-8.5.-.el6.x86_64 /
Verifying : :tcl-devel-8.5.-.el6.x86_64 /
Verifying : libselinux-devel-2.0.-.el6.x86_64 /
Verifying : :tk-8.5.-.el6.x86_64 /
Verifying : libXrender-devel-0.9.-.el6.x86_64 /
Verifying : libXau-devel-1.0.-.el6.x86_64 /
Verifying : gdbm-devel-1.8.-.el6.x86_64 /
Verifying : db4-4.7.-.el6_6.x86_64 /
Verifying : db4-utils-4.7.-.el6_6.x86_64 /
Verifying : gdbm-1.8.-.el6.x86_64 /
Verifying : libcom_err-1.41.-.el6.x86_64 /
Verifying : libxcb-1.9.-.el6.x86_64 /
Verifying : e2fsprogs-1.41.-.el6.x86_64 /
Verifying : libselinux-utils-2.0.-5.8.el6.x86_64 /
Verifying : libX11-1.6.-.el6.x86_64 /
Verifying : freetype-2.3.-.el6_6..x86_64 /
Verifying : openssl-1.0.1e-.el6.x86_64 /
Verifying : libXft-2.3.-.el6.x86_64 /
Verifying : db4-cxx-4.7.-.el6_6.x86_64 /
Verifying : krb5-workstation-1.10.-.el6.x86_64 /
Verifying : libss-1.41.-.el6.x86_64 /
Verifying : krb5-libs-1.10.-.el6.x86_64 /
Verifying : libselinux-2.0.-5.8.el6.x86_64 /
Verifying : libXrender-0.9.-2.1.el6.x86_64 /
Verifying : libX11-common-1.6.-.el6.noarch /
Verifying : libselinux-python-2.0.-5.8.el6.x86_64 /
Verifying : e2fsprogs-libs-1.41.-.el6.x86_64 /
Verifying : sqlite-3.6.-.el6.x86_64 /
Verifying : db4-devel-4.7.-.el6_6.x86_64 / 已安装:
bzip2-devel.x86_64 :1.0.-.el6_0 libpcap-devel.x86_64 :1.4.-.20130826git2dbcaa1.el6
ncurses-devel.x86_64 :5.7-4.20090207.el6 openssl-devel.x86_64 :1.0.1e-.el6
readline-devel.x86_64 :6.0-.el6 sqlite-devel.x86_64 :3.6.-.el6_7.
tk-devel.x86_64 :8.5.-.el6 xz-devel.x86_64 :4.999.-0.5.beta.20091007git.el6
zlib-devel.x86_64 :1.2.-.el6 作为依赖被安装:
fontconfig-devel.x86_64 :2.8.-.el6 freetype-devel.x86_64 :2.3.-.el6
keyutils-libs-devel.x86_64 :1.4-.el6 krb5-devel.x86_64 :1.10.-.el6
libX11-devel.x86_64 :1.6.-.el6 libXau-devel.x86_64 :1.0.-.el6
libXft-devel.x86_64 :2.3.-.el6 libXrender-devel.x86_64 :0.9.-.el6
libcom_err-devel.x86_64 :1.41.-.el6 libkadm5.x86_64 :1.10.-.el6
libselinux-devel.x86_64 :2.0.-.el6 libsepol-devel.x86_64 :2.0.-.el6
libxcb-devel.x86_64 :1.12-.el6 tcl.x86_64 :8.5.-.el6
tcl-devel.x86_64 :8.5.-.el6 tk.x86_64 :8.5.-.el6
xorg-x11-proto-devel.noarch :7.7-.el6 更新完毕:
db4-devel.x86_64 :4.7.-.el6 gdbm-devel.x86_64 :1.8.-.el6 作为依赖被升级:
db4.x86_64 :4.7.-.el6 db4-cxx.x86_64 :4.7.-.el6
db4-utils.x86_64 :4.7.-.el6 e2fsprogs.x86_64 :1.41.-.el6
e2fsprogs-libs.x86_64 :1.41.-.el6 freetype.x86_64 :2.3.-.el6
gdbm.x86_64 :1.8.-.el6 krb5-libs.x86_64 :1.10.-.el6
krb5-workstation.x86_64 :1.10.-.el6 libX11.x86_64 :1.6.-.el6
libX11-common.noarch :1.6.-.el6 libXft.x86_64 :2.3.-.el6
libXrender.x86_64 :0.9.-.el6 libcom_err.x86_64 :1.41.-.el6
libselinux.x86_64 :2.0.-.el6 libselinux-python.x86_64 :2.0.-.el6
libselinux-utils.x86_64 :2.0.-.el6 libss.x86_64 :1.41.-.el6
libxcb.x86_64 :1.12-.el6 openssl.x86_64 :1.0.1e-.el6
sqlite.x86_64 :3.6.-.el6_7. 完毕!
[root@hadoop1 hadoop]#
3、下载Python3安装包
https://www.python.org
从官网下载,下载的版本是Python-3.6.4.tgz
4、安装python3
个人习惯安装在/usr/local/python3(具体安装位置看个人喜好)
创建目录:
[root@hadoop1 bin]# mkdir -p /usr/local/python3
[root@hadoop1 bin]#
上传并解压安装包
[root@hadoop1 soft]# ls
Python-3.6.4.tgz
[root@hadoop1 soft]# tar -zxvf Python-3.6.4.tgz -C /usr/local/python3/
5、进入解压后的目录,添加配置
[root@hadoop1 soft]# cd /usr/local/python3/
[root@hadoop1 python3]# ls
Python-3.6.
[root@hadoop1 python3]# cd Python-3.6.4/
[root@hadoop1 Python-3.6.]# ./configure --prefix=/usr/local/python3
执行过程中报错
[root@hadoop1 Python-3.6.]# ./configure --prefix=/usr/local/python3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/python3/Python-3.6.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[root@hadoop1 Python-3.6.]#
报错原因是由于本机中缺少gcc编译环境,2种解决方式
1、通过yum安装gcc编译环境:yum install -y gcc
2、本机没有安装yum功能,可下载gcc安装包:https://gcc.gnu.org/
[root@hadoop1 Python-3.6.]# yum install -y gcc
[root@hadoop1 Python-3.6.]# yum install -y gcc
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirrors.neusoft.edu.cn
* extras: mirrors.neusoft.edu.cn
* updates: mirror.bit.edu.cn
解决依赖关系
--> 执行事务检查
---> Package gcc.x86_64 :4.4.-.el6_9. will be 安装
--> 处理依赖关系 libgomp = 4.4.-.el6_9.,它被软件包 gcc-4.4.-.el6_9..x86_64 需要
--> 处理依赖关系 cpp = 4.4.-.el6_9.,它被软件包 gcc-4.4.-.el6_9..x86_64 需要
--> 处理依赖关系 libgcc >= 4.4.-.el6_9.,它被软件包 gcc-4.4.-.el6_9..x86_64 需要
--> 处理依赖关系 cloog-ppl >= 0.15,它被软件包 gcc-4.4.-.el6_9..x86_64 需要
--> 执行事务检查
---> Package cloog-ppl.x86_64 :0.15.-1.2.el6 will be 安装
--> 处理依赖关系 libppl_c.so.()(64bit),它被软件包 cloog-ppl-0.15.-1.2.el6.x86_64 需要
--> 处理依赖关系 libppl.so.()(64bit),它被软件包 cloog-ppl-0.15.-1.2.el6.x86_64 需要
---> Package cpp.x86_64 :4.4.-.el6_9. will be 安装
--> 处理依赖关系 libmpfr.so.()(64bit),它被软件包 cpp-4.4.-.el6_9..x86_64 需要
---> Package libgcc.x86_64 :4.4.-.el6 will be 升级
---> Package libgcc.x86_64 :4.4.-.el6_9. will be an update
---> Package libgomp.x86_64 :4.4.-.el6 will be 升级
---> Package libgomp.x86_64 :4.4.-.el6_9. will be an update
--> 执行事务检查
---> Package mpfr.x86_64 :2.4.-.el6 will be 安装
---> Package ppl.x86_64 :0.10.-.el6 will be 安装
--> 完成依赖关系计算 依赖关系解决 ================================================================================================================
软件包 架构 版本 仓库 大小
================================================================================================================
正在安装:
gcc x86_64 4.4.-.el6_9. updates M
为依赖而安装:
cloog-ppl x86_64 0.15.-1.2.el6 base k
cpp x86_64 4.4.-.el6_9. updates 3.7 M
mpfr x86_64 2.4.-.el6 base k
ppl x86_64 0.10.-.el6 base 1.3 M
为依赖而更新:
libgcc x86_64 4.4.-.el6_9. updates k
libgomp x86_64 4.4.-.el6_9. updates k 事务概要
================================================================================================================
Install Package(s)
Upgrade Package(s) 总下载量: M
下载软件包:
(/): cloog-ppl-0.15.-1.2.el6.x86_64.rpm | kB :
(/): cpp-4.4.-.el6_9..x86_64.rpm | 3.7 MB :
(/): gcc-4.4.-.el6_9..x86_64.rpm | MB :
(/): libgcc-4.4.-.el6_9..x86_64.rpm | kB :
(/): libgomp-4.4.-.el6_9..x86_64.rpm | kB :
(/): mpfr-2.4.-.el6.x86_64.rpm | kB :
(/): ppl-0.10.-.el6.x86_64.rpm | 1.3 MB :
----------------------------------------------------------------------------------------------------------------
总计 1.8 MB/s | MB :
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在升级 : libgcc-4.4.-.el6_9..x86_64 /
正在安装 : ppl-0.10.-.el6.x86_64 /
正在安装 : cloog-ppl-0.15.-1.2.el6.x86_64 /
正在安装 : mpfr-2.4.-.el6.x86_64 /
正在安装 : cpp-4.4.-.el6_9..x86_64 /
正在升级 : libgomp-4.4.-.el6_9..x86_64 /
正在安装 : gcc-4.4.-.el6_9..x86_64 /
清理 : libgcc-4.4.-.el6.x86_64 /
清理 : libgomp-4.4.-.el6.x86_64 /
Verifying : libgomp-4.4.-.el6_9..x86_64 /
Verifying : gcc-4.4.-.el6_9..x86_64 /
Verifying : mpfr-2.4.-.el6.x86_64 /
Verifying : cloog-ppl-0.15.-1.2.el6.x86_64 /
Verifying : cpp-4.4.-.el6_9..x86_64 /
Verifying : ppl-0.10.-.el6.x86_64 /
Verifying : libgcc-4.4.-.el6_9..x86_64 /
Verifying : libgomp-4.4.-.el6.x86_64 /
Verifying : libgcc-4.4.-.el6.x86_64 / 已安装:
gcc.x86_64 :4.4.-.el6_9. 作为依赖被安装:
cloog-ppl.x86_64 :0.15.-1.2.el6 cpp.x86_64 :4.4.-.el6_9. mpfr.x86_64 :2.4.-.el6
ppl.x86_64 :0.10.-.el6 作为依赖被升级:
libgcc.x86_64 :4.4.-.el6_9. libgomp.x86_64 :4.4.-.el6_9. 完毕!
[root@hadoop1 Python-3.6.]#
重新执行命令 添加配置
[root@hadoop1 Python-3.6.]# ./configure --prefix=/usr/local/python3
[root@hadoop1 Python-3.6.]# ./configure --prefix=/usr/local/python3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for a sed that does not truncate output... /bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure: By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line. checking for the platform triplet based on compiler characteristics... x86_64-linux-gnu
checking for -Wl,--no-as-needed... yes
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for the Android API level... not Android
checking for --with-suffix...
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for GNU ld... yes
checking for inline... inline
checking for --enable-shared... no
checking for --enable-profiling... no
checking LDLIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking for ranlib... ranlib
checking for ar... ar
checking for readelf... readelf
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for --with-pydebug... no
checking for --with-assertions... no
checking for --enable-optimizations... no
checking for --with-lto... no
checking target system type... x86_64-pc-linux-gnu
checking for -llvm-profdata... no
checking for llvm-profdata... ''
checking for -Wextra... yes
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn off gcc unused result warning... no
checking if we can turn off gcc unused parameter warning... yes
checking if we can turn off gcc missing field initializers warning... yes
checking if we can turn on gcc mixed sign comparison warning... yes
checking if we can turn on gcc unreachable code warning... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking whether gcc accepts -pthread... yes
checking whether g++ also accepts flags for thread support... no
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/xattr.h usability... yes
checking sys/xattr.h presence... yes
checking for sys/xattr.h... yes
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... no
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/random.h usability... no
checking sys/random.h presence... no
checking for sys/random.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/stat.h... (cached) yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... no
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking linux/tipc.h usability... yes
checking linux/tipc.h presence... yes
checking for linux/tipc.h... yes
checking linux/random.h usability... yes
checking linux/random.h presence... yes
checking for linux/random.h... yes
checking spawn.h usability... yes
checking spawn.h presence... yes
checking for spawn.h... yes
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether sys/types.h defines makedev... yes
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking for net/if.h... yes
checking for linux/netlink.h... yes
checking for linux/can.h... yes
checking for linux/can/raw.h... yes
checking for linux/can/bcm.h... no
checking for clock_t in time.h... yes
checking for makedev... yes
checking for le64toh... yes
checking Solaris LFS bug... no
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for ssize_t... yes
checking for __uint128_t... yes
checking size of int...
checking size of long...
checking size of long long...
checking size of void *...
checking size of short...
checking size of float...
checking size of double...
checking size of fpos_t...
checking size of size_t...
checking size of pid_t...
checking size of uintptr_t...
checking for long double support... yes
checking size of long double...
checking size of _Bool...
checking size of off_t...
checking whether to enable large file support... no
checking size of time_t...
checking for pthread_t... yes
checking size of pthread_t...
checking for --enable-framework... no
checking for dyld... no
checking the extension of shared libraries... .so
checking LDSHARED... $(CC) -shared
checking CCSHARED... -fPIC
checking LINKFORSHARED... -Xlinker -export-dynamic
checking CFLAGSFORSHARED...
checking SHLIBS... $(LIBS)
checking for sendfile in -lsendfile... no
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for library containing sem_init... -lpthread
checking for textdomain in -lintl... no
checking aligned memory access is required... no
checking for --with-hash-algorithm... default
checking for --with-address-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.... yes
checking for --with-system-expat... no
checking for --with-system-ffi... yes
checking for --with-system-libmpdec... no
checking for --enable-loadable-sqlite-extensions... no
checking for --with-tcltk-includes... default
checking for --with-tcltk-libs... default
checking for --with-dbmliborder...
checking for --with-threads... yes
checking if PTHREAD_SCOPE_SYSTEM is supported... yes
checking for pthread_sigmask... yes
checking for pthread_atfork... yes
checking if --enable-ipv6 is specified... yes
checking if RFC2553 API is available... yes
checking ipv6 stack type... linux-glibc
checking for CAN_RAW_FD_FRAMES... no
checking for --with-doc-strings... yes
checking for --with-pymalloc... yes
checking for --with-valgrind... no
checking for --with-dtrace... no
checking for dlopen... yes
checking DYNLOADFILE... dynload_shlib.o
checking MACHDEP_OBJS... none
checking for alarm... yes
checking for accept4... yes
checking for setitimer... yes
checking for getitimer... yes
checking for bind_textdomain_codeset... yes
checking for chown... yes
checking for clock... yes
checking for confstr... yes
checking for ctermid... yes
checking for dup3... yes
checking for execv... yes
checking for faccessat... yes
checking for fchmod... yes
checking for fchmodat... yes
checking for fchown... yes
checking for fchownat... yes
checking for fexecve... yes
checking for fdopendir... yes
checking for fork... yes
checking for fpathconf... yes
checking for fstatat... yes
checking for ftime... yes
checking for ftruncate... yes
checking for futimesat... yes
checking for futimens... yes
checking for futimes... yes
checking for gai_strerror... yes
checking for getentropy... no
checking for getgrouplist... yes
checking for getgroups... yes
checking for getlogin... yes
checking for getloadavg... yes
checking for getpeername... yes
checking for getpgid... yes
checking for getpid... yes
checking for getpriority... yes
checking for getresuid... yes
checking for getresgid... yes
checking for getpwent... yes
checking for getspnam... yes
checking for getspent... yes
checking for getsid... yes
checking for getwd... yes
checking for initgroups... yes
checking for kill... yes
checking for killpg... yes
checking for lchmod... no
checking for lchown... yes
checking for linkat... yes
checking for lstat... yes
checking for lutimes... yes
checking for mmap... yes
checking for memrchr... yes
checking for mbrtowc... yes
checking for mkdirat... yes
checking for mkfifo... yes
checking for mkfifoat... yes
checking for mknod... yes
checking for mknodat... yes
checking for mktime... yes
checking for mremap... yes
checking for nice... yes
checking for openat... yes
checking for pathconf... yes
checking for pause... yes
checking for pipe2... yes
checking for plock... no
checking for poll... yes
checking for posix_fallocate... yes
checking for posix_fadvise... yes
checking for pread... yes
checking for pthread_init... no
checking for pthread_kill... yes
checking for putenv... yes
checking for pwrite... yes
checking for readlink... yes
checking for readlinkat... yes
checking for readv... yes
checking for realpath... yes
checking for renameat... yes
checking for select... yes
checking for sem_open... yes
checking for sem_timedwait... yes
checking for sem_getvalue... yes
checking for sem_unlink... yes
checking for sendfile... yes
checking for setegid... yes
checking for seteuid... yes
checking for setgid... yes
checking for sethostname... yes
checking for setlocale... yes
checking for setregid... yes
checking for setreuid... yes
checking for setresuid... yes
checking for setresgid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setpriority... yes
checking for setuid... yes
checking for setvbuf... yes
checking for sched_get_priority_max... yes
checking for sched_setaffinity... yes
checking for sched_setscheduler... yes
checking for sched_setparam... yes
checking for sched_rr_get_interval... yes
checking for sigaction... yes
checking for sigaltstack... yes
checking for siginterrupt... yes
checking for sigpending... yes
checking for sigrelse... yes
checking for sigtimedwait... yes
checking for sigwait... yes
checking for sigwaitinfo... yes
checking for snprintf... yes
checking for strftime... yes
checking for strlcpy... no
checking for symlinkat... yes
checking for sync... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for tempnam... yes
checking for timegm... yes
checking for times... yes
checking for tmpfile... yes
checking for tmpnam... yes
checking for tmpnam_r... yes
checking for truncate... yes
checking for uname... yes
checking for unlinkat... yes
checking for unsetenv... yes
checking for utimensat... yes
checking for utimes... yes
checking for waitid... yes
checking for waitpid... yes
checking for wait3... yes
checking for wait4... yes
checking for wcscoll... yes
checking for wcsftime... yes
checking for wcsxfrm... yes
checking for wmemcmp... yes
checking for writev... yes
checking for _getpty... no
checking whether dirfd is declared... yes
checking for chroot... yes
checking for link... yes
checking for symlink... yes
checking for fchdir... yes
checking for fsync... yes
checking for fdatasync... yes
checking for epoll... yes
checking for epoll_create1... yes
checking for kqueue... no
checking for prlimit... no
checking for ctermid_r... no
checking for flock declaration... yes
checking for flock... yes
checking for getpagesize... yes
checking for broken unsetenv... no
checking for true... true
checking for inet_aton in -lc... yes
checking for chflags... no
checking for lchflags... no
checking for inflateCopy in -lz... yes
checking for hstrerror... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for setgroups... yes
checking for openpty... no
checking for openpty in -lutil... yes
checking for forkpty... yes
checking for memmove... yes
checking for fseek64... no
checking for fseeko... yes
checking for fstatvfs... yes
checking for ftell64... no
checking for ftello... yes
checking for statvfs... yes
checking for dup2... yes
checking for strdup... yes
checking for getpgrp... yes
checking for setpgrp... (cached) yes
checking for gettimeofday... yes
checking for clock_gettime... no
checking for clock_gettime in -lrt... yes
checking for clock_getres... yes
checking for clock_settime... yes
checking for major... yes
checking for if_nameindex... yes
checking for lockf... yes
checking for getaddrinfo... yes
checking getaddrinfo bug... no
checking for getnameinfo... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for struct stat.st_blocks... yes
checking for struct passwd.pw_gecos... yes
checking for struct passwd.pw_passwd... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking for addrinfo... yes
checking for sockaddr_storage... yes
checking for sockaddr_alg... no
checking whether char is unsigned... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for socketpair... yes
checking if sockaddr has sa_len member... no
checking for gethostbyname_r... yes
checking gethostbyname_r with args... yes
checking for __fpu_control... yes
checking for --with-fpectl... no
checking for --with-libm=STRING... default LIBM="-lm"
checking for --with-libc=STRING... default LIBC=""
checking for x64 gcc inline assembler... yes
checking whether C doubles are little-endian IEEE binary64... yes
checking whether C doubles are big-endian IEEE binary64... no
checking whether C doubles are ARM mixed-endian IEEE binary64... no
checking whether we can use gcc inline assembler to get and set x87 control word... yes
checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
checking for x87-style double rounding... no
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for copysign... yes
checking for erf... yes
checking for erfc... yes
checking for expm1... yes
checking for finite... yes
checking for gamma... yes
checking for hypot... yes
checking for lgamma... yes
checking for log1p... yes
checking for log2... yes
checking for round... yes
checking for tgamma... yes
checking whether isinf is declared... yes
checking whether isnan is declared... yes
checking whether isfinite is declared... yes
checking whether tanh preserves the sign of zero... yes
checking whether log1p drops the sign of negative zero... no
checking whether POSIX semaphores are enabled... yes
checking for broken sem_getvalue... no
checking whether RTLD_LAZY is declared... yes
checking whether RTLD_NOW is declared... yes
checking whether RTLD_GLOBAL is declared... yes
checking whether RTLD_LOCAL is declared... yes
checking whether RTLD_NODELETE is declared... yes
checking whether RTLD_NOLOAD is declared... yes
checking whether RTLD_DEEPBIND is declared... yes
checking digit size for Python's longs... no value specified
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking size of wchar_t...
checking for UCS- tcl... no
checking whether wchar_t is signed... yes
no usable wchar_t found
checking whether byte ordering is bigendian... no
checking ABIFLAGS... m
checking SOABI... cpython-36m-x86_64-linux-gnu
checking LDVERSION... $(VERSION)$(ABIFLAGS)
checking whether right shift extends the sign bit... yes
checking for getc_unlocked() and friends... yes
checking how to link readline libs... -lreadline
checking for rl_callback_handler_install in -lreadline... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_display_matches_hook in -lreadline... yes
checking for rl_resize_terminal in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for append_history in -lreadline... yes
checking for broken nice()... no
checking for broken poll()... no
checking for struct tm.tm_zone... (cached) yes
checking for working tzset()... yes
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for term.h... yes
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for is_pad... no
checking for is_term_resized... yes
checking for resize_term... yes
checking for resizeterm... yes
checking for immedok... yes
checking for syncok... yes
checking for wchgat... yes
checking for filter... yes
checking for has_key... yes
checking for typeahead... yes
checking for use_env... yes
configure: checking for device files
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %zd printf() format support... yes
checking for socklen_t... yes
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking whether gcc -pthread supports computed gotos... yes
checking for build directories... done
checking for -O2... yes
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for gcc ipa-pure-const bug... no
checking for stdatomic.h... no
checking for GCC >= 4.7 __atomic builtins... no
checking for ensurepip... upgrade
checking if the dirent structure of a d_type field... yes
checking for the Linux getrandom() syscall... no
checking for the getrandom() function... no
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
creating Modules/Setup
creating Modules/Setup.local
creating Makefile If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations [root@hadoop1 Python-3.6.]#
6、编译源码
[root@hadoop1 Python-3.6.]# make
7、执行安装
[root@hadoop1 Python-3.6.]# make install
8、将python3的目录复制到/usr/bin/目录下
[root@hadoop1 /]# cp -r /usr/local/python3/ /usr/bin/
[root@hadoop1 /]#
9、建立软连接
对/usr/bin目录下的python3目录重命名为python364
[root@hadoop2 Python-3.6.4]# cd /usr/bin/
[root@hadoop1 bin]# mv python3 python364
建立软链接
[root@hadoop1 bin]# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
可以ls -l查看一下
10、配置环境变量
[root@hadoop1 bin]# vi /etc/profile
#Python3.6.4
PATH=$PATH:$HOME/bin:/usr/bin/python3/bin
export PATH
修改完记得执行行下面的命令,让上一步的修改生效:
[root@hadoop1 bin]# source /etc/profile
11、检查验证
[root@hadoop1 bin]# python3 -V
Python 3.6.
[root@hadoop1 bin]#
12、安装模块
[root@hadoop1 bin]# pip3 install paramiko
bash: /usr/bin/pip3: 没有那个文件或目录
报错么有这个命令
建立pip3的软连接
[root@hadoop1 bin]# ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
重新安装模块
[root@hadoop1 bin]# pip3 install paramiko
Collecting paramiko
Could not find a version that satisfies the requirement paramiko (from versions: )
No matching distribution found for paramiko
You are using pip version 9.0., however version 9.0. is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@hadoop1 bin]#
Python学习之路 (一)开发环境搭建的更多相关文章
- qt学习教程1.qt开发环境搭建
qt学习教程1.qt开发环境搭建 首先下载qt 下载地址:http://download.qt.io/archive/qt/ 此教程使用的版本为5.1.1 下载好后,打开安装包,然后点下一步 选择一个 ...
- 8086汇编语言学习(二) 8086汇编开发环境搭建和Debug模式介绍
1. 8086汇编开发环境搭建 在上篇博客中简单的介绍了8086汇编语言.工欲善其事,必先利其器,在8086汇编语言正式开始学习之前,先介绍一下如何搭建8086汇编的开发环境. 汇编语言设计之初是用于 ...
- 零基础Android学习笔记-01 安卓开发环境搭建
安卓开发环境搭建. 1.首先准备JDK,从官网找到JDK下载地址,原来做.NET不熟悉JAVA,干脆用最新的,下载了JDK 1.7的版本.原来装过1.5还要配置环境变量什么的.但1.7好像很给力,装好 ...
- Mybatis学习(1)开发环境搭建
什么是mybatis MyBatis是支持普通SQL查询,存储过程和高级映射的优秀持久层框架.MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及结果集的检索.MyBatis使用简单的XML ...
- Zephyr学习(二)开发环境搭建
一.概述 Zephyr支持在Windows.Linux和MacOS环境下开发,这里只介绍如何在Windows下搭建zephyr的开发环境. 二.步骤 2.1安装msys2 msys2是一个Linux模 ...
- python--基础学习(一)开发环境搭建,体验HelloWorld
python学习之前 最近想用python写爬虫,由于之前没接触过,所以从零开始,找了技术博文大概了解下基础. 印象比较深的是"python你不去认识它,可能没什么,一旦你认识了它,你就会爱 ...
- jmeter学习记录--10--二次开发环境搭建
JMeter源码集成到Eclipse.JMeter二次开发(1)-eclipse环境配置及源码编译 ,根据此文章记录将jmeter源码集成到myecplise 第一步:下载jmeter源码http:/ ...
- 【EJB学习笔记】——EJB开发环境搭建(Eclipse集成JBoss)
之前一直用的EJB开发环境是他们搭建好的,直接拿来用,不过还是感觉老吃别人嚼好的不太好吃,所以自己动手来玩一玩. EJB开发依赖的最基本的环境:JDK.Eclipse.JBoss,这里简单介绍一下最基 ...
- Cocos2d-x学习笔记之Cocos2d-x开发环境搭建
作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz Cocos2d-x源码包下载地址: http://cocos2d-x.org/projects/cocos2d-x/ ...
- 吴裕雄--天生自然Android开发学习:1.2 开发环境搭建
现在主流的Android开发环境有: ①Eclipse + ADT + SDK ②Android Studio + SDK ③IntelliJ IDEA + SDK 现在国内大部分开发人员还是使用的E ...
随机推荐
- Kafka、RabbitMQ、RocketMQ消息中间件的对比
引言 分布式系统中,我们广泛运用消息中间件进行系统间的数据交换,便于异步解耦.现在开源的消息中间件有很多,目前对Kafka.RabbitMQ.RocketMQ这三个消息中间件做下对比分析. - - k ...
- Telnet 模拟邮件发送过程
Telnet 模拟邮件发送过程 windows要提前开启Telnet客户端的功能,再按照下面步骤完成邮件发送: 1.通过 cmd 进入命令窗口 2.连接要发送邮件的服务器:telnet smtp.al ...
- Java并发基础知识你知道多少?
并发 https://blog.csdn.net/justloveyou_/article/details/53672005 并发的三个特性是什么? 什么是指令重排序? 单线程的指令重排序靠什么保证正 ...
- IDEA下的第一个springBoot
1.第一步打开File->New->Project,SDK根据自己的需要选择,我这边选的是java7 2.Next之后 设置group 和artifact,根据自己的需要进行修改. 3.导 ...
- mysqli返回受影响行数
参考链接:http://php.net/manual/en/mysqli.affected-rows.php /* update rows */ $mysqli->query("UPD ...
- 零基础全面学习HTML
基础框架 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" co ...
- 如何发挥ERP系统中的财务监控职能?
ERP系统的管理理念与特点 ERP,是整合了企业管理理念.业务流程.基础数据.人力物力.计算机硬件和软件于一体的企业资源管理系统.ERP系统运用信息技术将企业的资金流.物资流.信息流进行有效的集成,使 ...
- Batch Norm、Layer Norm、Weight Norm与SELU
加速网络收敛——BN.LN.WN与selu 自Batch Norm出现之后,Layer Norm和Weight Norm作为Batch Norm的变体相继出现.最近又出来一个很”简单”的激活函数Sel ...
- Reducing and Profiling GPU Memory Usage in Keras with TensorFlow Backend
keras 自适应分配显存 & 清理不用的变量释放 GPU 显存 Intro Are you running out of GPU memory when using keras or ten ...
- OpenLDAP 2.4 禁止匿名用户访问
ldapmodify -Q -Y EXTERNAL -H ldapi:/// <<EOF dn: cn=config changetype: modify add: olcDisallow ...