0

I'm a *nix noob. I'm on Ubuntu 16.04.

I'm trying to install bluepy to a virtualenv. It is currently installed under my user (not a virtualenv). When running pip freeze I see it listed under my user. When I activate the virtualenv and run pip freeze it does not show up. I tried to install it under the virtualenv using the following command: sudo pip3 install bluepy. It returns this:

The directory '/home/todd/.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/todd/.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.

I'm not sure what to do. If responding please add explanations so I can learn something. Thanks!

EDIT:

This answer did not help solve my problem. It was tailored for a Mac OS, not Ubuntu. pip install: Please check the permissions and owner of that directory

twegner
  • 443
  • 1
  • 5
  • 21
  • Possible duplicate of [pip install: Please check the permissions and owner of that directory](https://stackoverflow.com/questions/27870003/pip-install-please-check-the-permissions-and-owner-of-that-directory) – phd Apr 06 '18 at 21:59
  • I saw that one. It didn't help. The first answer did not work, the second is for a Mac OS. The third just adds -H which makes the message go away, but doesn't fix anything. – twegner Apr 06 '18 at 22:36
  • The second answer there is for you, you just need to change username and paths. – phd Apr 06 '18 at 22:40
  • @phd. The path in the answer is not present in Ubuntu. `/Users/USERNAME/Library/Logs/pip`. Remember, I'm a *nix noob. A little hand-holding goes a long way. – twegner Apr 06 '18 at 22:43
  • You need to activate the virtualenv before running pip install. – alvits Apr 07 '18 at 00:25
  • @alvits, I did activate the virtualenv. I was installing it from the virtualenv. – twegner Apr 07 '18 at 18:19
  • You did 2 mistakes here. First you installed `bluepy` on the base environment, that’s why it’s available in the base but not in the virtualenv. Second, you activated the virtualenv but you tried to install as root. The installer is smart enough to bail out when the virtualenv and cache are not owned by the person installing a module. You ned to run `pip install bluepy` as the owner of the virtualenv. – alvits Apr 07 '18 at 20:28

0 Answers0