Python Environment setup

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.