-2

I tried to install google cloud module on Ubuntu 16.04 for python 3 but it shows permission error 13

this error is shown many times during installations for my python environment PermissionError: [Errno 13] Permission denied: /usr/lib/python3/dist-packages/httplib2-0.9.1.egg-info

Zachary Newman
  • 20,014
  • 4
  • 39
  • 37

2 Answers2

0

For the sake of completeness I will answer this partly because:

1) the first duplicate suggested (although correct) is for Mac

2) the second duplicate suggestion is for Django and returns a different error.


As Jean François Fabre said in his comments use

sudo pip install --upgrade gcloud`

Without this command pip cannot access the root dictionary to write the appropriate files. This is due to security reasons where nothing can be written in the root dictionary unless sudo prefix is specified so that only the superuser can allow security privileges.

See Wikipedia for info on the sudo command

Xantium
  • 11,201
  • 10
  • 62
  • 89
0

Unlike others suggest, it's not good practice to let pip install be called with sudo rights. Instead, you should use chown. You should give yourself rights to the directory or files and not use sudo.

You'll get the same effect, much more safely.

Oyster773
  • 375
  • 1
  • 10