Article Directory
1. Download and install python
Red Hat 1.1 will be compiled into the kernel python
If you are using a Red Hat system, then we open with a Terminal, enter python, we foundRed Hat will be compiled into the kernel python。
1.2 python download
But the python 2.7.5 for us somewhat outdated, python has been out to the 3.7 version, we we Wenzhongqiusheng,The most classic python3.6。
- First we download the installation package python3.6 .
1.3 compile and install
At first, weDownload an installation package python3.6 interpreterI have downloaded well, nowDecompression:
Enter python3.6 directoryUnder ready to compile and install:
StartSource compiler:
Note : We need the following compilerOption Module:
./configure
--prefix=/usr/local/python3 # 将解释器编译安装在第三方软件安装目录/usr/local下
--with-ssl # 添加ssl加密
Source compiler errors, lack of necessary tools to compile the source code later, weWhat little on what the installation。
right nowInstall the C compiler: gcc
once againCompile and install
Theninstallation。
make && make install # 源码安装
Note : Whether or installed in the compilation, weCommand must be executed in the installation package python3.6 directory。
Installation errors:
Install the corresponding tool:
At this time we have installed a success! ! !
1.4 startup command
Next we hope can be compiled just before python2 python3 like the same,Enter the command, you can directly useWe do the following:
First of allFind the boot file:
willStart feet added to the environment variable:
1.4.1 temporarily add
Note : Temporary added,The terminal off, or turn off the server, there is no。
1.4.2 permanently added
Note : When you want to write variablesOK we did not wrong, after the executable file。
So that our python3 interpreter completely installed successfully! ! !
.