Recently learning Python, because some modules in Linux can be more obvious effect, so on this machine with the Oracle VM Vitualbox installed a linux6.5 virtual machine. and the learning environment Python with 3.5+,linux is the 2.6.6, it needs to install a new version of the. The process is as follows (with Yum source configuration)
Virtual machine installation process is not detailed, mainly to configure the network this block, I set the host-only mode, and on the virtual machine configuration fixed IP, boot boot, using the Xmanager tool to connect. There is no big problem. Baidu is a problem.
---------------the split line, the entire process is logged into the root account below to get to the chase----------------
Steps:
1, download python3.6, and then upload with FTP tool.
2, use the command decompression, reference, can be replaced by your version TAR-ZXVF python-3.6.1.tgz
3, enter the directory, execute./configure--prefix=/usr/local/python3
An error occurred during this process, configure:error:no acceptable C compiler found in $PATH. After Baidu to view the problem, it should be GCC is not installed. Begin the process of configuring the Yum source to install GCC
---------------------------Yum configuration, gcc installation-----------------------
Because it is a virtual machine, it can be mounted directly on the disc,
The location of my disc mount here is/dev/cdrom,
Using the command mount/dev/cdrom/mnt, and then viewing under/mnt, the contents of the disc appear.
Configure the Yum source to rename the original repo file to the ***.repo1 file. The contents of my file are as follows, for reference only, if there is a problem, Baidu. Answer a lot, there is always a suitable for you:
[Root@aaaddd software]# More/etc/yum.repos.d/dvd.repo [dvd]name=linux6.5baseurl=file:///mnt/servergpgcheck= 1ENABLE=1[ROOT@AAADDD software]#
Then execute yum clean to clear the Yum cache
Execute Yum Makecache to create a new cache
Then execute the Yum install GCC, encounter the prompt to enter Y, complete the installation. I encountered an error in this step, resolved (Baidu came to) as follows:
Warning:rpmts_HdrFromFdno:Header V3 rsa/sha256 Signature, key ID fd431d51:nokeypublic key for cpp-4.4.7-4.el6.i686.rpm is not installed[root@aaaddd python-3.6.1]# [root@aaaddd python-3.6.1]# [root@aaaddd python-3.6.1]# [root@aaaddd python-3.6.1]# rpm--IMPORT/ETC/PKI/RPM-GPG/RPM*[ROOT@AAADDD python-3.6.1]#
Then execute the Yum install GCC and finish installing the
----------------------------continue with the Python installation-------------------------------------------
Go to Python installation file directory execution./configure--prefix=/usr/local/python3 (--prefix=/usr/local/python3 is the installation path, recommended)
Enter make &&make install after execution is complete
If the process also occurs, such as less packet, the direct yum install can be. Don't know the name can add *
Last: The most important thing is to add a soft connection, otherwise you cannot start Python3 "This is the disadvantage of the specified path."
Ln-s/usr/local/python3/bin/python3/usr/bin/python3
Once this is done, you can enter Python3 to start.