I'm running Ubuntu 15.10. I installed Pyhon 2.7 through aptitude:
sudo apt-get install python
now I'm trying to install pip using this guide. I downloaded get-pip.py
, then I tried:
sudo python get-pip.py
Installation worked fine, but I got these annoying warnings:
The directory '/home/administrator/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/administrator/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
So I uninstalled all by the following command:
sudo python -m pip uninstall pip setuptools
And I tried a new installation without sudo
:
python get-pip.py
but I got the following error:
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip'
How can I install pip (and wheels) in a proper way with caching enabled?