Two Methods:
-
You can install through Ubuntu Software Center.
-
Open Ubuntu Software Center and search for
easy_install
-
Highlight alternative Python package installer (python-pip) from thelist and click Install
-
You can check weather the installation was successful or not bygiving the command
which pip
you will see the path of installed application, for example
/usr/local/bin/pip
-
-
Second method
-
Open terminal by pressing CTRL+ALT+T and type the following:
cd ~
to navigate to your home directory.
-
Then issue the below command:
wget -P Downloads/ https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py
-
Next step is to run the downloaded script. To do this, issue thiscommand:
sudo python Downloads/distribute_setup.py
-
and type your user password when prompted (Please, note that youraccount needs to be a member of Administrators group in order toissue
sudo
). -
Hit
Enter
and let the script run. -
To ensure easy_install is installed, issue the command below:
which easy_install
The typical response in case the installation completed successfullywould look something like this:
/usr/local/bin/easy_install
-
The next thing to do is use easy_install to install pip. For thatyou’ll need to issue:
sudo easy_install pip
-
Enter your password if prompted to confirm command.
-
Let the installer run and once the installation is completed type:
which pip
This command should typically respond with something like this:
/usr/local/bin/pip
-
我用的第二种方法,开始不管用,捣鼓了半天,又重新来了一遍,可以了……生无可恋
http://askubuntu.com/questions/268539/unable-to-locate-package-python-pip
我用虚拟机安装的Ubuntu 用sudo apt-get install 突然又可以了……,单独的系统已经通过上述方法突然也可以了, 接着生无可恋中
(是不是因为我把每个error的链接都打开看看它们,害羞了?就好了?哈哈,或者是我打开后路通了,然后它就跟上来了?机智)
源好任性