I have been trying to set up Python-android environment, and kept getting this error message:
~$ sudo apt-get install build-essential patch git-core ccache ant pip python-devsudo: /var/lib/sudo/plaix writable by non-owner (040777), should be mode 0700
[sudo] password for plaix:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip
In Ubuntu, pip
is provided by the python-pip
package. You can install it in the Software Center, or, if you prefer to use the command line:
sudo apt-get update && sudo apt-get install python-pip
If you have not already installed python-dev
and build-essential
, you should install them too. (But it seems your apt-get
command might have successfully installed them. If you're not sure, you can check by trying to install them again. Or with apt-cache policy python-dev build-essential
.)
Once the necessary software is installed, if you wish to update it further, you can do so with pip
itself, by running:
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
Source: How to install pip on Ubuntu by Eliot (dated, but should still apply).
To install pip, download get-pip.py.
Then run this command:
sudo python get-pip.py
It will download and install pip from the source.
To check if pip is installed, type this:
which pip
it will show where pip is located
/usr/local/bin/pip
or just type:
pip
The package you want is not called pip
, the name depends on the python version.
Python 2:
sudo apt-get install python-pip
Python 3:
sudo apt install python3-pip
Python packages generally have a python
prefix.
Try installing python-pip
instead of pip
(this may change depending the distribution you are working on).
Just update using:
sudo apt-get update
Your problem will be resolved.
Just Remove python-pip-whl
sudo apt-get remove python-pip-whl
now try again it will work