无法安装点子

时间:2019-01-18 19:34:57

标签: python-2.7 pip

我尝试通过以下不同方式安装pip,但没有成功,没有指导,如何安装pip?

username@machine ~]$ sudo /usr/local/bin/easy_install pip
[sudo] password for username: 
Searching for pip
Reading http://pypi.python.org/simple/pip/
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

[username@machine ~]$ sudo /usr/local/bin/easy_install-2.7 pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

[username@machine ~]$ python -m pip
/usr/local/bin/python: No module named pip
[username@machine ~]$ sudo apt-get install python-pip
sudo: apt-get: command not found

[username@machine ~]$ sudo yum install python-pip
Loaded plugins: security
Setting up Install Process
No package python-pip available.
Error: Nothing to do

机器配置:

LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description:    Oracle Linux Server release 6.6
Release:    6.6
Codename:   n/a

2 个答案:

答案 0 :(得分:1)

您可以尝试将以下内容用于python2.7:

  

sudo apt安装python-pip

如果您要在python3上安装:

  

sudo apt安装python3-pip

答案 1 :(得分:0)

以上所有方法均无效,根据official docs,我必须对OL7执行以下操作:

yum install -y oracle-epel-release-el7 oracle-release-el7