In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First, install python3
1. Install the dependency package yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make-y
2. Download the python installation package wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
The reason for downloading and installing python3.5.2 here is mainly due to the good stability of combining Django in the later stage.
3. Extract the python installation package tar-Jxvf Python-3.5.2.tar.xz
4. Configure the installation path
Go to the decompression directory.
. / configure prefix=/usr/local/python3
5. Compile and install
Go to the decompression directory.
Make & & make install
6. Configure soft connection ln-s / usr/local/python3/bin/python3 / usr/bin/python3
Ln-s / usr/local/python3/bin/pip3 / usr/bin/pip3
Python3.5.2 and pip3 can now be used normally
It is found here that pip3 cannot be used after configuring soft links:
Solution:
[root@localhost bin] # which pip3/usr/bin/pip3 [root@localhost bin] # pip3-bash: / usr/local/bin/pip3: there is no such file or directory [root@localhost bin] # type pip3pip3 has been hashed (/ usr/local/bin/pip3) [root@localhost bin] # hash-r [root@localhost bin] # type pip3pip3 is / usr/bin/pip3
7. Export the list of packages previously installed by python in Windows
Open cmd and switch to Desktop
Pip freeze > package.txt
Then import it into Centos7 and install the module in the file with pip3
So far, the functions and common modules in python3 have been installed and can be used normally.
Uninstall python3
View the current python version:
Python-V
Note that when uninstalling, the 2 or 3 followed by python or nothing will be deleted.
Uninstall python3 rpm-qa | grep python3 | xargs rpm-ev-- allmatches-- nodeps uninstall pyhton3 whereis python3 | xargs rm-frv delete all remaining files successfully uninstalled! Whereis python to view an existing installation of python
Summary
The above is the tutorial of installing python3 and uninstalling Centos7 introduced by Xiaobian to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website! If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
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: 227
*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.