Install python in linux and python in linux

Source: Internet
Author: User

Install python in linux and python in linux
IntroductionPython 2.6 is provided in linux6.5, And the yum program uses the built-in python. Therefore, do not uninstall the python that comes with the system. Otherwise, yum may not be used. Test environment: centos6.7python: python 3.5.2;: https://www.python.org/ftp/python/3.5.2/ install python1. Build a file

./configure --prefix=/usr/local/python35

After the configure command is executed, a Makefile is generated, which is used by the next make command. Open Makefile and you will find that the building sequence is set in it. Linux needs to build program components according to the sequence specified by Makefile. Note that I have specified the python installation directory. This will make it easy to directly Delete the directory when it is uninstalled.

2. Compile

make

The make process mainly involves compiling the source code to generate executable files and related directories.

3. Install and copy

make install

Make install actually copies the generated file and related directories to the specified path. If a path is specified, it is copied to the specified path. Otherwise, it is the default path of the program.

4. Modify Environment VariablesVim/etc/profiler
PATH=$PATH:/usr/local/python35/bin
Summary

By default, python comes in the/usr/bin directory. It is best to specify a directory for installing python; otherwise, it will be a little troublesome to uninstall python.

 

 

Note:

Author: pursuer. chen

Blog: http://www.cnblogs.com/chenmh

All essays on this site are original. You are welcome to repost them. However, you must indicate the source of the article and clearly give the link at the beginning of the article.

Welcome to discussion

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.