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 |