0

The image is a screenshot of the error which i am getting while this command in ubuntu-

$ sudo pip install virtualenv

The directory '/home/asha/.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/asha/.cache/pip/http' or its parent directory is not owned by the current user and caching wheels has been disabled. check permission and owner of that directory. if executing pip with sudo, you may want sudo's -H flag. 
Requirement already satisfied: virtualenv in ./.local/lib/python2.7/site-packages""

screenshot

9
  • 3
    1. there is no image. 2. please don't include images, copy/paste the text into the question.
    – Rinzwind
    Aug 8, 2018 at 12:31
  • No link to the image.
    – Zeiss Ikon
    Aug 8, 2018 at 12:31
  • 1
    The message is self explanatory, "The directory '/home/asha/.cache/pip/http' or its parent directory is not owned by the current user " so what are the ownership and permissions of /home/asha/.cache/pip/http ? chown them to you user, see help.ubuntu.com/community/FilePermissions and / or askubuntu.com/questions/83/how-do-file-permissions-work . We can not give more specific advice with what little you posted
    – Panther
    Aug 8, 2018 at 14:35
  • Thank you Panther for your input, I checked the owner and user of the directories, both owner and user of the directories are same and it has drwx privilege so i tried chmod command and gave both rwx privilege ie. drwxrwxr-- but still its not working and giving the same error.
    – BestWay
    Aug 8, 2018 at 18:07
  • This should work sudo chown asha:asha -R /home/asha/.cache
    – Panther
    Aug 9, 2018 at 6:09

1 Answer 1

0

I have no score to write a comment. So answer here.

Usually instaling by sudo xxx yyyyy do not bring enough permissions to change directories an files.

A good work around is to open a terminal, log as root and install:

$ sudo -i
password for rootname:
$ pip install virtualenv

Now, the instaler has full rights

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .