程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

/usr/bin/python: No module named pip

編輯:Python

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


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved