1. First go to the official website https://www.python.org/downloads/source/ and download the Gzipped source tarball Do not download " XZ compressed source tarball ". The latest version of Python 3.6 is named Python-3.6.7.tgz. Put the downloaded compressed package anywhere, or put it on the desktop (to facilitate deletion of the installation package and the unzipped installation package after installation). 2. Switch the command line to the directory where the compressed file is located (such as the desktop), and then enter Here, tar means decompression, -x means extracting files from the archive file, z means decompressing with gzip (for compressed packages in xx.tgz and xx.tar.gz formats), and f is followed by the compressed file name. 3. Switch the command line directory to the unzipped folder, which is the Python-3.6.7 folder. Then execute ./configure . The function of this command is to generate a Makefile file for use by the next make command. The Makefile file stores the build order. When building program components in linux, you need to follow the order specified by the Makefile. 4. Run make The function of make is to mutate the source code and generate executable files. Execute make install copies the generated executable files to the necessary directory in the Linux system, such as the usr/local/bin directory, so that all users can run the program. So far, the installation of Python is complete. The installation of other Linux software is similar, basically the process of configure>make>make install. Execute which python to view the installation directory of Python. The python that comes with linux and the python we installed are both stored in this directory. However, when we enter python in the command line, we find that the old version of python that comes with Linux is still entered. If we want to enter the new version of python, we need to enter python3 in the command line. Check whether the installation is successful: enter python3, enter shell mode, and enter a line of code: Will output the string content. To view the installation location: Enter the shell and enter import sys print(sys.path) Summarize The above is a detailed tutorial on how to compile and install python 3.6 on linux. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
>>: How to use rem adaptation in Vue
VC6.0 is indeed too old VC6.0 is a development to...
Overview As for the current default network of Do...
Recently, I need to do a small verification exper...
There are many Hadoop installation tutorials on L...
Using the knowledge of CSS variables, I will dire...
First, there is only one change event. changeleve...
Table of contents 1. Realistic Background 2. Agre...
1. Change the Host field value of a record in the...
Table of contents 01 Introduction to GTID 02 How ...
This article example shares the specific code of ...
Table of contents 1. Installation: 2. Use: 3. Bui...
Method 1: Modify the .bashrc or .bash_profile fil...
This article example shares the specific code of ...
= Only when setting and updating does it have the...
Portainer Introduction Portainer is a graphical m...