Python installation in Linux

Source: Internet
Author: User

Python installation in Linux

Compile and install it in the Python-2.7.3 root directory./configure supplement: After the configure command is executed, a Makefile file is generated. This Makefile is mainly used by the next make command. Open Makefile and you will find that the build sequence is set in it. Linux needs to build program components according to the sequence specified by Makefile. Make actually compiles your source code and generates an execution file. Run the make install command to make install to copy the generated execution file to the necessary directory in linux, for example, to the/usr/local/bin directory, in this way, all users can run this program. Python installation is complete. It should be said that, in fact, other linux software installation is similar, basically all need to go through the configure> make install process. After Hello World is installed, run the python command, you will find that the default python command still points to the old version 2.4.3 [admin @ bej301441 bin] $ which python/usr/local/bin/python to execute the which python command, you will find that the default python is in the/usr/local/bin/python directory. In fact, the newly installed python is also in this directory. Enter python2.7 in the command line to execute the new python version. Create a "hello. py" file on Linux and write only one line of code print "Hello PTIAN" in it, and then run python2.7 hello. py.
 

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.