Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of installing python3 on Linux system

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Most people do not understand the knowledge points of this article, "what is the method of installing python3 in Linux system?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the method of installing python3 in Linux system".

1. Install the dependency package 1. Install the gcc compiler first. Some system versions of gcc have been installed by default. Check through gcc-version. Install gcc,yum-y install gcc first if not installed.

2. Install other dependent packages. (note: do not lack it, otherwise there may be errors in installing python. Versions below python3.7.0 may not install libffi-devel.)

Yum-y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel

Second, download the python3.7.0 source code. 1. Select the python source code package you need in https://www.python.org/ftp/python/. I downloaded python3.7.0 (you can also download it from the home page of the https://www.python.org official website, find downloads, and you can choose the version you want to download).

2. Download

Wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz

3. Decompress Python-3.7.0.tgz

Tar-zxvf Python-3.7.0.tgz

4. Create an empty folder for storing python3 programs

Mkdir / usr/local/python3

5. Execute configuration file, compile, compile and install

Cd Python-3.7.0. / configure-- prefix=/usr/local/python3 make & & make install installation completed without error and installed successfully

6. Establish a soft connection

Ln-s / usr/local/python3/bin/python3.7 / usr/bin/python3 ln-s / usr/local/python3/bin/pip3.7 / usr/bin/pip37, test whether python3 can be used

[root@mini Python-3.7.0] # python3 Python 3.7.0 (default, Jul 28 2018, 22:47:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. > print ("hello world!") Hello world! > exit () [root@mini Python-3.7.0] # pip3-- version pip 10.0.1 from / usr/local/python3/lib/python3.7/site-packages/pip (python3.7) the above is the content of this article about "what is the method of installing python3 on Linux system?" I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, Please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report