In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces what is the method of installing Python3 and python3-pip in Deepin 20.2, the content is very detailed, interested friends can refer to it, I hope it can be helpful to you.
First of all, it is stated that there is a built-in Python in the Deepin 20.2 system, and the Python2 series version is used by default. Although this version is very old, Python2 is at the bottom of the system and will not be easily removed or changed to the default Python3 version.
Description
Deepin 20.2 comes with versions 2.7 and 3.7, which can be called using python3. Pip corresponds to Python2,pip3 and corresponds to python3. Basically, all commands correspond to each other, followed by a 3.
The current default pyhon command points to python2. Because in the current situation, many of the underlying layers rely on Python2, so users should not change the default. As for when to change the version, it needs to be migrated to python3 first.
Installation method
You can install Python3 by yourself, and then change the default Python of the system to Python3.
The specific steps are as follows:
1. Install Python3 and python3-pip:
Sudo apt install python3 python3-pip
2. View the Python command file:
$ls / usr/bin/python*-lh
3. Set the system default Python to Python3:
Sudo update-alternatives-install / usr/bin/python python / usr/bin/python3.7 2
Sudo update-alternatives-- install / usr/bin/python python / usr/bin/python2.7 1
4. After modifying the default Python, check the version of the default Python:
$which python
/ usr/bin/python
$python-version
Python 3.7.3
5. To switch the default Python between Python2 and Python3, you can run the following command:
Sudo update-alternatives-config python
Note: this method is easiest if all users on the same machine use Python3 by default.
Description of relevant attention
System python had better not move, or use pyenv to install the version of python you want, pipenv with the version of pyenv installation to build a virtual environment. My is that the system pip only installs a pipx (installs and uses Pipx to install and run Python applications in an isolated environment), pipx is used to install python tools, such as ipython/thefuck/black, etc., the development can be virtual environment, tools and development environment can be separated from the system.
What can python do Python is a programming language, built in many effective tools, Python is almost omnipotent, the language is easy to understand, easy to start, powerful, in many fields, such as the most popular big data analysis, artificial intelligence, Web development and so on.
On Deepin 20.2 what is the method to install Python3 and python3-pip is shared here, I hope the above content can be of some help to you, can 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.
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.