CentOS 7 comes with python2.7 and cannot use the pip command to solve the problem

1. First check whether the python-pip package is installed in Linux, and execute  yum install python-pip directly

提示:Cannot find a valid baseurl for repo: base/7/x86_64

(Here, my server can't connect to the Internet, I need to configure dns, vi /etc/resolv.conf, add servername 8.8.8.8 and the second line servername 4.4.4.4)

2. Hint: There is no package python-pip available. Just execute the command  yum -y install epel-release. Then execute  yum install python-pip

3. Upgrade the installed pip  pip install --upgrade pip


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324608179&siteId=291194637