In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to install python3.7 in the Linux system, the content is very detailed, interested friends can refer to, hope to be helpful to you.
[installation environment]
Operating system: Liunx centos7
Python version: python 3.7.x
[notes]
The centos system itself is installed with python2.x by default. Version x varies according to different versions of the system. You can view the python version that comes with the system through python-V or python-version.
Python2 is required for some system commands, so don't uninstall it.
[installation steps]
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 it is 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
2. Download the python3.7.0 source code and download it as needed.
1) choose the python source code package you need in https://www.python.org/ftp/python/, and I downloaded python3.7.0.
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/python3make & & make install
After the installation is completed, the installation is successful without an error.
6. Establish a soft connection
Ln-s / usr/local/python3/bin/python3.7 / usr/bin/python3ln-s / usr/local/python3/bin/pip3.7 / usr/bin/pip3
7. Test whether python3 can be used.
[root@mini Python-3.7.0] # python3Python 3.7.0 (default, Jul 28 2018, 22:47:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linuxType "help", "copyright" "credits" or "license" for more information. > > print ("hello world!") hello world! > > exit () [root@mini Python-3.7.0] # pip3-- versionpip 10.0.1 from / usr/local/python3/lib/python3.7/site-packages/pip (python3.7) about how to install python3.7 in a Linux system is here. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.