How to install PIP under Deepin

Recently, I set up a Python development environment on the Deepin system and encountered a lot of strange problems. Here is a summary.

1. There is no PIP in Deepin and the software cannot be installed online

Question: After the Deepin system is installed, although it comes with two versions of Python (one 2.X and one 3.X), there is no pip. Therefore, it is impossible to directly install some third-party software (also called modules and libraries) online using pip.

 

 

 

Solution: Use apt-get install python3-pip -y (root user) or sudo apt-get install python3-pip -y (normal user) to install PIP.

2. What to do when the internet speed is very slow during the installation of PIP

Problem: Sometimes when installing software using the default software source of the Deepin system, the network speed will be very slow, which is unbearable.

Solution: replace the default image source, the specific operations are as follows:

 

 

Directly by modifying the configuration file: echo 'deb [by-hash = force] http://ftp.sjtu.edu.cn/deepin/ lion main contrib non-free'> /etc/apt/sources.list (modify the file Remember to backup before, this command will clear the contents of the entire sources.list).

Finally, you only need to execute: apt-get update (root user) or sudo apt-get update (common user) to make the newly configured software source take effect, then you can install and update the software or program normally.

So far, the problem of no PIP under Deepin system has been solved.

~The END~

Guess you like

Origin www.cnblogs.com/wuweierdao/p/12721550.html