Forums

Unable to install pyGravatar

Hi, I tried to install pyGravatar using pip but it doesn't work as expected.

Downloading/unpacking pyGravatar
  Downloading pyGravatar-0.0.5.tar.gz
  Running setup.py (path:/tmp/pip_build_josyulakrishna/pyGravatar/setup.py) egg_info for package pyGravatar

Installing collected packages: pyGravatar
  Running setup.py install for pyGravatar
    error: /usr/local/lib/python2.7/dist-packages/gravatar.py: Permission denied
    Complete output from command /usr/local/bin/python2.7 -c "import setuptools,         token    ize;__file__='/tmp/pip_build_josyulakrishna/pyGravatar/setup.py';exec(compile(getattr(tokeni
ze, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-grH8WA-record/install-record.txt --     single-version-externally-managed --com
pile:
    running install

    running build

   running build_py

   creating build

   creating build/lib.linux-x86_64-2.7

   copying gravatar.py -> build/lib.linux-x86_64-2.7

    running install_lib

copying build/lib.linux-x86_64-2.7/gravatar.py -> /usr/local/lib/python2.7/dist-packages

error: /usr/local/lib/python2.7/dist-packages/gravatar.py: Permission denied

----------------------------------------
Cleaning up...
Command /usr/local/bin/python2.7 -c "import setuptools,     tokenize;__file__='/tmp/pip_build_josyulakrishna/pyGravatar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file_
_).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-grH8WA-record/install-record.txt --single-version-    externally-managed --compile failed with error co
    de 1 in /tmp/pip_build_josyulakrishna/pyGravatar
    Storing debug log for failure in /home/josyulakrishna/.pip/pip.log

How do i fix this?

Did you use '--user'?

I'm very new to these things can you please explain a bit? thanks.

Sorry I was so short - just packing up for the night!

In a Bash shell, use:

pip install pygravatar --user

That's 'hyphen' 'hyphen' 'user', NOT your user name.

HTH Jim

Thank so much Jim!!

;----)