Personally prefer the Linux system, in the Linux system and more like Ubuntu, so here only to introduce the environment of Ubuntu set up (normally Linux system installed by default Python)
Ubuntu:
1. Source Code Installation:
To https://www.python.org/download the latest version of Python, I have installed here, too lazy to install, direct interception of other people's
[Email protected]Virtual-machine:~/python$ wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz-- -- to- + -: .: +--http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgzParsing host www.python.org (www.python.org) ...82.94.164.162,2001:888: -:d:: A2 connecting www.python.org (www.python.org)|82.94.164.162|: the... is connected. An HTTP request has been made and is waiting for a response ... $OK Length:14492759(14M) [application/x-tar] saving to:"python-2.7.5.tgz" -%[======================================================>] -,492,759182k/s spents 88s -- to- + -: ,: ,(162KB/S)-Saved"python-2.7.5.tgz"[14492759/14492759]) to unzip the Python installation package. [Email protected]-Virtual-machine:~/python$ TAR-ZXVF python-2.7.5. Tgz[email protected]-Virtual-machine:~/python$ Lspython-2.7.5python-2.7.5. TGZ Classic Installation Trilogy. [Email protected]-Virtual-machine:~$ CD python/python-2.7.5/[email protected]-Virtual-machine:~/python/python-2.7.5$sudo./configure--prefix=/usr/local/python2.7.5[email protected]-Virtual-machine:~/python/python-2.7.5$ sudo make[email protected]-Virtual-machine:~/python/python-2.7.5$ sudo make install--prefix=/usr/local/python2.7. 5 means to specify the installation directory for the current program. To avoid conflicts, we then make a soft connection. [Email protected]-Virtual-machine:~/python/python-2.7.5$ sudo ln-s/bin/local/python2.7.5/bin/python/bin/python2.7.5
The above is intercepted from http://www.cnblogs.com/jiaoweixue/archive/2013/05/25/3098701.html
Since Linux is installed with Python (preferably not uninstalled), if you want to use the new version of Python, you should be aware that when you use the command "Pyhon" to start Python, the system default Python is launched, So when you're finished installing the new Python, it's best to add a soft connection that distinguishes the two.
2. Install with Apt-get
Running Apt-get install Python directly can be installed successfully, I prefer this way, simple.
Python Environment setup