In the installation pip The tool times an error as follows :
/usr/bin/python: No module named pip
Find the information and say to install first ensurepip modular , You can recover pip:
python -m ensurepip
But the result shows that there is no ensurepip modular :
/usr/bin/python: No module named ensurepip
In fact, you can use the following command to download and install pip Script for :
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # Download the installation script
give the result as follows :
# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2617k 100 2617k 0 0 18212 0 0:02:27 0:02:27 --:--:-- 33651
install pip:
python get-pip.py
If the following error is reported during execution , Describe scripts and installed python Version does not correspond to , Then download the installation script file again according to the prompt path :
# python get-pip.py
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
See the following results , Installation pip success :
If pip Outdated Version , You can upgrade through the following command :
# python -m pip install --upgrade pip