Downloading Requests for python error on ubuntu
Question: I'm running ubuntu on my computer and I'm trying to download
[requests](http://docs.python-requests.org/en/latest/).

However, when I do `pip install requests` it gives me an error:

    
    
    writing manifest file 'requests.egg-info/SOURCES.txt'
    
    running install_lib
    
    creating /usr/local/lib/python2.7/dist-packages/requests
    
    error: could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied
    
    ----------------------------------------
    Command /usr/bin/python -c "import setuptools;__file__='/home/alejandro/build/requests/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tT3Boe-record/install-record.txt failed with error code 1
    

Does anyone have any tips on how to get past this or fix it?


Answer: Your error

    
    
    could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied
    

suggests that you tried to install the package system-wide as a regular user -
which you don't have permission to do.

You can either install the package just for yourself with the `--user` option:

    
    
    pip install --user requests
    

... or install it system-wide as root using `sudo`:

    
    
    sudo pip install requests
    

Alternatively, you could look into using a [virtual
environment](http://virtualenvwrapper.readthedocs.org/en/latest/).

