How to upgrade Python 2.7 in Linux system
This article mainly introduces the relevant knowledge of how to upgrade Python 2.7 in the Linux system, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to upgrade Python 2.7 in the Linux system. Let's take a look.
What can python do?
Python is a programming language with many effective tools built into it. Python can do almost anything. It is easy to understand, easy to use, powerful, and has been widely used in many fields, such as the most popular big data analysis, artificial intelligence, Web development and so on.
1. Prepare the compilation environment gcc
two。 Go to the official website to download the source code of the corresponding version of python to be installed
3. Extract the downloaded code package
Tar-zxvfPython-x.x.x.tgz
4. Configuration
1) find the configuration file
find. -name configuration
CD search results (usually in the root directory of the Python file) 2) configuration. / configuration 5. Compile
Do
Makeinstall (if there are no other special requirements, the installation ends. Enter pythonx.x and enter the python development environment that you just installed)
6. Replace the previous default version of python (create a new soft connection)
Cd/usr/bin/
Rm-rfpython
Ln-s/usr/local/python-x. X. X/bin/python . / python
This is the end of the article on "how to upgrade Python 2.7 in Linux system". Thank you for reading! I believe you all have some knowledge about "how to upgrade Python 2.7 in Linux system". If you want to learn more, you are welcome to follow the industry information channel.