初识 Python

2023-01-31 02:01:13 python 初识

1.源码安装 ipython 1.2.1

[root@Client-1]# tar -xf iPython 1.2.1.tar.gz

[root@Client-1]cd ipython 1.2.1

[root@Client-1 ipython-1.2.1]# python setup.py install

2.通过pip安装 ipython 1.2.1

确认是否有epel源

[root@Client-1 ~]# ll /etc/yum.repos.d/

total 36

-rw-r--r--. 1 root root 2572 May 15  2015 Centos-Base.repo

-rw-r--r--. 1 root root 1991 Oct 23  2014 CentOS-Base.repo.backup

-rw-r--r--  1 root root  647 Mar 28  2017 CentOS-Debuginfo.repo

-rw-r--r--  1 root root  289 Mar 28  2017 CentOS-fasttrack.repo

-rw-r--r--  1 root root  630 Mar 28  2017 CentOS-Media.repo

-rw-r--r--  1 root root 7989 Mar 28  2017 CentOS-Vault.repo

-rw-r--r--. 1 root root 1083 May 15  2015 epel.repo(***********要有这个源************)

没有就安装

[root@Client-1 ~]#yum install epel-release-6-8.noarch.rpm


[root@Client-1 ~]#yum install python-pip -y

如果有下面的提示:

You are using pip version 7.1.0, however version 9.0.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

Requirement already satisfied (use --upgrade to upgrade): python in /usr/lib64/python2.6/lib-dynload

则:

[root@Client-1 ~]# pip install --upgrade pip


[root@Client-1 ~]#pip install ipython==1.2.1 (指定安装1.2.1 默认安装最新版的)

[root@Client-1 ~]#pip list|grep ipython

ipython (1.2.1)

3.使用ipython

[root@Client-1 ~]# ipython

Python 2.6.6 (r266:84292, Nov 22 2013, 12:11:10) 

Type "copyright", "credits" or "license" for more infORMation.


IPython 1.2.1 -- 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]: 


相关文章