Python Learning notes Install Python
Installation methods for CentOS and Ubuntu python2.7 Reference: http://daixuan.blog.51cto.com/5426657/1767325
1. View the current Python version and
[Email protected] ~]# Python-vpython 2.6.6
2. Install eple-release extension Source
[email protected] ~]# Yum install-y epel-release
3. Install Pip
[[Email protected] ~] #yum Install Python-pip
4, install Ipython (because the system Python version is 2.6.6, so the installation ipthon1.2.1 compatible)
[[Email protected] ~]# pip install ipython==1.2.1
Source installation, to the website download ipython-1.2.1.tar.gz
TAR-ZXVF ipython-1.2.1.tar.gz
CD ipython-1.2.1
Python setup.py Install
Note: If you do not specify a version, the latest version will be downloaded to the website: Https://pypi.python.org/pypi/ipython
[[email protected] ~]# yum install-y python-pip//Such installation will be problematic [[email protected] ~]# pip install Ipython//default installation is Ipython-4 .2.0,python2.6 cannot use [[email protected] ~]# Ipythontraceback (most recent call last): File '/usr/bin/ipython ', line 7, in &L T;module> from IPython import start_ipython File '/usr/lib/python2.6/site-packages/ipython/__init__.py ', line, I n <module> raise Importerror (' IPython requires Python version 2.7 or 3.3 or above. ') Importerror:ipython requires Python version 2.7 or 3.3 or above.
4, the test Ipython automatic completion function
[Email protected] ~]# Ipython Python 2.6.6 (r266:84292, Jul, 15:22:56) Type "copyright", "credits" or "license" f or 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 Sy Stem.object? Details about ' object ', use ' object? ' for extra details. In [1]: Print 2+46
This article comes from "Plum blossom fragrance from bitter cold!" "Blog, be sure to keep this provenance http://daixuan.blog.51cto.com/5426657/1771895
Python Learning notes Install Python