1

I followed this link to install Gittle library. But when I run a command

$ pip install gittle 

I get an error:

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_victor /gittle/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-aoyPEt-record/install-record.txt --single-version-externally- managed --compile failed with error code 1 in /tmp/pip_build_victor/gittle Storing debug log for failure in /home/victor/.pip/pip.log

My Python version is 2.7.6.

4
  • Does the log give any more details on what exactly goes wrong? Commented Nov 8, 2014 at 12:54
  • @ ivan_pozdeev Well, I finally did it. Just running sudo pip install gittle did a trick. Commented Nov 8, 2014 at 12:55
  • Then please add this as a answer and accept it (for a badge and maybe some rep). Commented Nov 8, 2014 at 12:59
  • 1
    Btw, here's a fitting allusion: freesoftwaremagazine.com/articles/bizarre_cathedral_95 Commented Nov 8, 2014 at 13:02

1 Answer 1

1

You Need Root Privileges

Since you are installing sistem-wide libraries, these usually will be placed in directories which need root privileges for writing in them (for example anything under /usr/lib). Hence you need to either run the command as root:

# pip install gittle 

Or you can use sudo:

$ sudo pip install gittle 

What About Virtual Environments?

The more efficient/pythonic way to go about this would be using virtual environments. This is especially true if you are installing project-specific libraries, which will most probably not be required by other projects. Another classical application of virtual environments is when you are working on a machine on which you don't have root privileges, say at university for example.

Once you set up a virtual environment, if you place it in a directory on which you have writing rights, you can run:

$ pip install gittle 

to install gittle in this case.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.