Python及IPython安装使用
Python:面向对象的解释型计算机程序设计语言
IPython:一个交互式计算系统。主要包含三个组件:增加的交互式 “Python shell”,解耦的双过程通信模型,交互式并行计算的架构。支持变量自动补全。
IPython是一个 python 的交互式 shell,相对于python shell,增加了变量自动补全,自动缩进,支持 bash shell 命令,内置了其它有用的功能和函数。
特点:
强大的交互式shell
Jupyter 内核
交互式的数据可视化工具
灵活、可嵌入的解释器
易于使用,高性能的并行计算工具
1、编译安装Python
[root@test ~]# tar zxf Python-2.7.tgz
[root@test ~]# ll
[root@test ~]# cd Python-2.7
[root@test Python-2.7]# ll
总用量 848
-rwxr-x--- 1 1000 1002 402781 5月 28 2010 configure
-rw-r----- 1 1000 1002 124898 5月 28 2010 configure.in
drwxr-x--- 23 1000 1002 4096 7月 3 2010 Demo
drwxr-x--- 17 1000 1002 4096 7月 3 2010 Doc
drwxr-x--- 2 1000 1002 4096 7月 3 2010 Grammar
drwxr-x--- 2 1000 1002 4096 7月 3 2010 Include
-rwxr-x--- 1 1000 1002 7122 6月 14 2003 install-sh
drwxr-x--- 47 1000 1002 12288 7月 3 2010 Lib
-rw-r----- 1 1000 1002 14231 7月 3 2010 LICENSE
drwxr-x--- 11 1000 1002 4096 7月 3 2010 Mac
-rw-r----- 1 1000 1002 40618 4月 12 2010 Makefile.pre.in
drwxr-x--- 5 1000 1002 4096 7月 3 2010Misc
drwxr-x--- 9 1000 1002 4096 7月 3 2010 Modules
drwxr-x--- 3 1000 1002 4096 7月 3 2010 Objects
drwxr-x--- 2 1000 1002 4096 7月 3 2010 Parser
drwxr-x--- 10 1000 1002 4096 7月 3 2010 PC
drwxr-x--- 2 1000 1002 4096 7月 3 2010 PCbuild
-rw-r----- 1 1000 1002 33981 5月 8 2010 pyconfig.h.in
drwxr-x--- 2 1000 1002 4096 7月 3 2010 Python
-rw-r----- 1 1000 1002 53728 7月 3 2010 README
drwxr-x--- 5 1000 1002 4096 7月 3 2010 RISCOS
-rw-r----- 1 1000 1002 88705 6月 27 2010 setup.py
drwxr-x--- 22 1000 1002 4096 7月 3 2010 Tools
查询编译参数帮助:
[root@test Python-2.7]# ./configure --help
安装依赖包
[root@test Python-2.7]# yum installreadline-devel
Installed:
readline-devel.x86_64 0:6.0-4.el6
Dependency Installed:
ncurses-devel.x86_64 0:5.7-4.20090207.el6
Dependency Updated:
ncurses-base.x86_64 0:5.7-4.20090207.el6
ncurses-libs.x86_64 0:5.7-4.20090207.el6
编译安装Python
[root@test Python-2.7]# ./configure--prefix=/usr/local/python27
[root@test Python-2.7]# make & makeinstall
测试Python是否安装成功
[root@test Python-2.7]# /usr/local/python27/bin/python2.7
Python 2.7 (r27:82500, May 20 2018,20:05:39)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] onlinux2
Type "help","copyright", "credits" or "license" for moreinformation.
>>> print "hello world!"
hello world!
>>> exit()
2、安装IPython
[root@test Python-2.7]# cd
[root@test ~]# tar zxf ipython-1.2.1.tar.gz
[root@test ~]# cd ipython-1.2.1
[root@test ipython-1.2.1]# ls
COPYING.txt docs examples IPython PKG-INFO README.rst scripts setupbase.py setupegg.py setupext setup.py
安装ipython
[root@test ipython-1.2.1]#/usr/local/python27/bin/python2.7 setup.py build
[root@test ipython-1.2.1]#/usr/local/python27/bin/python2.7 setup.py install
[root@test ipython-1.2.1]# ls/usr/local/python27/bin/
2to3 ipcontroller iptest pycolor python2.7 smtpd.py
idle ipengine ipython pydoc python2.7-config
ipcluster iplogger irunner python python-config
创建链接文件
[root@test ipython-1.2.1]# ln -sv/usr/local/python27/bin/python2.7 /usr/bin/python27
"/usr/bin/python27" ->"/usr/local/python27/bin/python2.7"
[root@test ipython-1.2.1]# ln -sv/usr/local/python27/bin/ipython /usr/bin/
"/usr/bin/ipython" ->"/usr/local/python27/bin/ipython"
测试ipython是否安装成功
[root@test ipython-1.2.1]# ipython
WARNING: IPython History requires SQLite,your history will not be saved
Python 2.7 (r27:82500, May 20 2018,20:05:39)
Type "copyright","credits" or "license" for more information.
IPython 1.2.1 -- An enhanced InteractivePython.
? -> 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]: print "hello field"
hello field
In [2]: import platform
In [3]: print platform.
platform.DEV_NULL platform.python_compiler
platform.architecture platform.python_implementation
platform.dist platform.python_revision
platform.java_ver platform.python_version
platform.libc_ver platform.python_version_tuple
platform.linux_distribution platform.re
platform.mac_ver platform.release
platform.machine platform.string
platform.node platform.sys
platform.os platform.system
platform.platform platform.system_alias
platform.popen platform.uname
platform.processor platform.version
platform.python_branch platform.win32_ver
platform.python_build
In [3]: print platform.release
<function release at 0x2486848>
In [4]: print platform.release();
2.6.32-279.el6.x86_64
In [5]: print platform.version();
#1 SMP Fri Jun 22 12:19:21 UTC 2012
In [6]: print platform.uname();
('Linux', 'test.field.com','2.6.32-279.el6.x86_64', '#1 SMP Fri Jun 22 12:19:21 UTC 2012', 'x86_64','x86_64')
Python及IPython安装使用相关推荐
- python用pip安装numpy mac_小白入门Python,mac下如何安装pip、ipython
作为一枚小白,最近在学习用Python写科学计算器,因为Mac不自带pip,安装的时候找了好几个帖子,才成功安装.做一下简单分享,希望对大家有帮助: 安装环境: Mac系统版本:OS X 10.11. ...
- 数据挖掘基础学习一:VMware虚拟机Ubuntu上安装Python和IPython Notebook(Jupyter Notebook)完整步骤及需要注意的问题(以ubuntu-18.04.3为例)
数据挖掘基础学习一:VMware虚拟机Ubuntu上安装Python和IPython Notebook(Jupyter Notebook)完整步骤及需要注意的问题 (以ubuntu-18.04.3-d ...
- ipython shell_交互式python shell之ipython安装
导语: IPython是Python的交互式Shell,提供了代码自动补完,自动缩进,高亮显示,执行Shell命令等非常有用的特性.特别是它的代码补完功能,例如:在输入zlib.之后按下Tab键,IP ...
- 【python】win10 安装 IPython
[python]win10 安装 IPython 什么是IPython Ipython是一种交互式解释器. Ipython的性能优于标准Python的shell. IPython支持变量自动补全,自动 ...
- 学python需要安装什么软件-学武汉Python培训课程需要安装什么软件?分享这10款...
工欲善其事必先利其器.初学者在学Python的时候,往往会因为没有好用的软件工具,走了很多弯路.因此一些好用的软件工具,可以极大地提高开发效率,那么学武汉Python培训课程需要安装什么软件呢?本文千 ...
- anaconda的python使用教程-Python,Anaconda简介安装使用教程
① 首先,自己也是闲来无趣刚刚开始接触Python这门语言,收集了一些关于一些初级的学前准备资料仅供大家参考 Python简介: Python 是一个高层次的结合了解释性.编译性.互动性和面向对象的脚 ...
- ipython安装教程-CentOS 5安装IPython
话说上次给那台装CentOS 5的免费VPS升级了Python,这次我们继续来安装IPython. 一.IPython是什么 IPython是Python的交互式Shell,提供了代码自动补完,自动缩 ...
- ipython安装_IPython 它不香吗?
当你需要操作一些 Python 交互的时候,你会在终端里面输入 python 从而开始一顿操作: 但如果你在 python 前面加多个 i ,也就是 ipython ,你会得到一个更加牛逼的 Pyt ...
- python不同版本安装;第三方库的安装
python不同版本安装以及安装第三方库 1.安装不同版本的python: python2.7 & python3.6 ps:安装过程中需要注意的是默认没有配置环 ...
- Linux下Ipython安装
Linux下Ipython安装 此文为源码包安装方式: 1.首先下载iptyhon安装包 #wget http://archive.ipython.org/release/old/0.8/ipytho ...
最新文章
- 安装sql 2005 闪退 连接到服务器失败。错误:0x80070424
- STORM_0001_用vmware拷贝出三个相同的ubuntu搭建小的zookeeper集群
- java-类的结构及使用
- effective c++_【阅读笔记】Effective C++()
- radiant序列码_阅“码”无数|第一期
- STM32 FreeRTOS USART DMA空闲中断和消息队列的使用
- python业余项目_学会这8个优秀 Python 库用于业余项目,将大大减少程序员耗费的精力...
- matlab贝塞尔函数的根,matlab画贝塞尔函数根分布的曲线图.doc
- 互联网时代的了解和未来的预期_互联网时代品牌农业该如何营销 后园带你了解这五点...
- git 还原某个文件到特定版本
- webpack5配置dev-server在控制台打印信息
- UVALive - 4487 HDU3234 UVA12232 【带权并查集】 非常好的一道题!!!
- 云桌面终端CT3200,硬件与信号连接
- 计算机专业职称入深户,深圳市人才引进入深户新政策
- js 京东关闭广告 pink
- 谷歌3d卫星地图下载
- 开发人员的人品问题 收藏
- Python 2D游戏项目开发日记——像素世界(一)
- DataGrip入门小tips
- 不动产纠纷包括房屋买卖合同吗