Chinaunix首页 | 论坛 | 博客

OPS

  • 博客访问: 504996
  • 博文数量: 117
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1210
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-05 14:50
个人简介

hellow 运维

文章分类

全部博文(117)

文章存档

2019年(1)

2018年(1)

2017年(45)

2016年(38)

2015年(32)

我的朋友

分类: 系统运维

2016-11-25 16:19:24

[root@hanye ~]# wget -c
[root@hanye ~]# wget -c
[root@hanye ~]# yum install readline-devel sqlite-devel -y
#这里如果不安装readline-devel,后面编译的python将没有删除功能
#这里如果不安装sqlite-devel,后面的iPython将报错(WARNING: IPython History requires SQLite, your history will not be saved)
[root@hanye ~]# tar xf Python-2.7.10.tar.xz
[root@hanye ~]# tar xf ipython-3.0.0.tar.gz
[root@hanye ~]# cd Python-2.7.10/
[root@hanye ~/Python-2.7.10]# ./configure --prefix=/usr/local/python2.7.10
[root@hanye ~/Python-2.7.10]# make -j $(awk '/processor/{i++}END{print i}' /proc/cpuinfo) && make install
[root@hanye ~/Python-2.7.10]# cd ../ipython-3.0.0/
[root@hanye ~/ipython-3.0.0]# /usr/local/python2.7.10/bin/python2.7 setup.py build
[root@hanye ~/ipython-3.0.0]# /usr/local/python2.7.10/bin/python2.7 setup.py install
[root@hanye ~/ipython-3.0.0]# cd ..
[root@hanye ~]# ln -sv /usr/local/python2.7.10/bin/ipython /usr/bin/
"/usr/bin/ipython" -> "/usr/local/python2.7.10/bin/ipython"
[root@hanye ~]# ln -sv /usr/local/python2.7.10/bin/python2.7 /usr/bin/
"/usr/bin/python2.7" -> "/usr/local/python2.7.10/bin/python2.7"
[root@hanye ~]# ipython -c "print 'hello'"
hello


[root@hanye ~]# ipython
Python 2.7.10 (default, Aug 27 2015, 01:19:59) 
Type "copyright", "credits" or "license" for more information.
 
IPython 3.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
 
In [1]: import platform
 
In [2]: platform.uname()
Out[2]: 
('Linux',
 'hanye.dwhd.org',
 '2.6.32-573.3.1.el6.centos.plus.x86_64',
 '#1 SMP Fri Aug 14 01:00:05 UTC 2015',
 'x86_64',
 'x86_64')
 
In [3]: platform.
platform.DEV_NULL               platform.node                   platform.python_implementation  platform.system
platform.architecture           platform.os                     platform.python_revision        platform.system_alias
platform.dist                   platform.platform               platform.python_version         platform.uname
platform.java_ver               platform.popen                  platform.python_version_tuple   platform.version
platform.libc_ver               platform.processor              platform.re                     platform.win32_ver
platform.linux_distribution     platform.python_branch          platform.release                
platform.mac_ver                platform.python_build           platform.string                 
platform.machine                platform.python_compiler        platform.sys                    
 
In [3]: exit
[root@hanye ~]#




























安装python3.5和ipthon5.0/
[root@hanye~]# yum install readline-devel sqlite-devel gcc make openssl openssl-devel zlib* -y
[root@hanye~]# curl -Lk | xz -d | tar x -C ./ && cd Python-3.4.5/
[root@hanye~/Python-3.4.5]# ./configure --prefix=/usr/local/python_3.4.5 && make -j $(awk '/processor/{i++}END{print i}' /proc/cpuinfo) && make install
[root@hanye~/Python-3.4.5]# echo 'export PATH=/usr/local/python_3.4.5/bin:$PATH' > /etc/profile.d/py3.sh && . /etc/profile.d/py3.sh
[root@hanye~/Python-3.4.5]# curl | python3.4
[root@hanye~/Python-3.4.5]# pip3 install jupyter
[root@hanye~/Python-3.4.5]# ipython -c "print ('hello')"
hello
[root@hanye~/Python-3.4.5]# ipython -V
5.0.0
阅读(992) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~