1, downloadPython
There are two types of Linux platforms,
Python 2.7compressed Source Tarball (For Linux, Unix or OS X)
Python 2.7bzipped Source Tarball (Forlinux, Unix or OS x,more compressed)
The second kind of compression is better, in Linux with bzip2 compressed file is relatively high, the file name is generally *.tar.bz2, but the second version of http. WWW.PYTHON.ORG/FTP/PYTHON/2.7/PYTHON-2.7.TAR.BZ2 This is the version of 2.7, not what I want, the connection in the 2.7 to change to 2.6 Will be able to go down to the version you want to install.
2, decompression
The downloaded package can be decompressed using the tar command, such as:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6B/74/wKiom1Ut-uiyHzTnAAFB52ibZ4M080.jpg "title=" Untitled. png "alt=" wkiom1ut-uiyhztnaafb52ibz4m080.jpg "/>
3, compiling, and installing
Linux generally installs user-installed software into the/usr/local/xxx/ , with configure and make, the Install These commands can be compiled and installed,--prefix Specify the destination directory to install, as follows:
go to python-2.6 folder
./configure--prefix=/usr/local/python-2.6
Make
Make install
4, detect, and set environment variables
Add path= $PATH in the /etc/profile file :/Usr/local/python-2.7.9/bin and source/etc/profile
Enter python2.7 directly to enter Python
5,IpythonSource Installation
to git page download:https://github.com/ipython/ipython/downloads
Suppose we download a file named:ipython-0.8.2.tar.gz
#tar zvxfipython-0.8.2.tar.gz // Unzip files
#cdipython -0.8.2 // Enter the folder you just unzipped
Enter the file and you will see a setup.py installation script, run the following command to install the
#pythonsetup. PY Install
This will install the Ipyhon library file in the Site-packages directory and create a Ipython script in the scripts directory . In Unix systems, the directory is the same as the Python binary file directory. If a python package is already installed on the system , Ipython will be installed in the/usr/bin directory.
Building a Python environment