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
Just Remove python-pip-whl
now try again it will work
Just update using:
Your problem will be resolved.
To install pip, download get-pip.py. Then run this command:
It will download and install pip from the source. To check if pip is installed, type this:
it will show where pip is located
or just type:
Python packages generally have a
python
prefix.Try installing
python-pip
instead ofpip
(this may change depending the distribution you are working on).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
In Ubuntu,
pip
is provided by thepython-pip
package. You can install it in the Software Center, or, if you prefer to use the command line:If you have not already installed
python-dev
andbuild-essential
, you should install them too. (But it seems yourapt-get
command might have successfully installed them. If you're not sure, you can check by trying to install them again. Or withapt-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:Source: How to install pip on Ubuntu by Eliot (dated, but should still apply).