In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "linux how to compile and install python3.6", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "linux how to compile and install python3.6" this article.
1. First, go to the official website https://www.python.org/downloads/source/ to download Gzipped source tarball
Do not download "XZ compressed source tarball". The name of the latest python3.6 package is: Python-3.6.7.tgz. Put the downloaded package anywhere, or you can put it on the desktop (it is easy to delete the installation package and unzip the installation package after installation).
two。 Change the command line to the directory where the compressed file is located above (such as the desktop), and type tar-xzf Python-3.6.7.tgz
Here tar means decompression,-x means to release the file from the archive file, z means to extract it with gzip (for xx.tgz and xx.tar.gz format), and f is followed by the name of the compressed file.
3. Change the command line directory to the unzipped folder, the Python-3.6.7 folder. Then execute. / configure.
The purpose of this command is to generate Makefile files for use by the next make command, Makefile files are stored in build order, and linux build program components need to be in the order specified by Makefile.
4. Execute make
The role of make is to mutate the source code and generate execution files.
Execute make install
Make install copies the generated execution files to the necessary directories in the linux system, such as to the usr/local/bin directory, so that all users can run the program.
At this point, the installation of python is complete, and the installation of other linux software is more or less the same, 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 stored in this directory. But when we enter python on the command line, we find that we are entering the old version of python that comes with linux. If we want to enter the new version of python, we need to type python3 on the command line.
Check whether the installation is successful: enter python3, enter shell mode, and enter a line of code:
Print ("Hello World")
The contents of the string are output.
To view the installation location: go to shell and type
Import sysprint (sys.path) above is all the contents of the article "how linux compiles and installs python3.6". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.