title: Getting an error of "No module named oauth2 "
body: <p>I am trying to run a python tool that will authenticate me to linkedin, in order for me to download my linkedin network so that I might be able to analyze it inside of Gephi. I obtained such a file here:</p>
  
  <p><a href="https://gist.github.com/ThomasCabrol/4232700" rel="nofollow noreferrer">linkedin-1-oauth.py from github</a></p>
  
  <p>I cloned that and the two other files he has in the gist. I did this from my terminal by just doing <code>git clone [url here]</code> for all 3 of the files. I put my api and secret keys in the corresponding places.</p>
  
  <p>I did a <code>pip install oauth2</code> and updated <code>httplib2</code> as suggested here:</p>
  
  <p><a href="https://stackoverflow.com/questions/7781233/python-why-is-installing-oauth2-so-hard">pip install oauth2 and update httplib2</a></p>
  
  <p>I also did this from the command line, which downloaded and installed the files in the same directory as to where I downloaded the linkedin files from gist, just all in my user folder.</p>
  
  <p>When trying <code>pip install oauth2</code> and get the following error message:</p>
  
  <pre><code>Downloading/unpacking oauth2
    Running setup.py egg_info for package oauth2
  
  Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/lib/python2.7/dist-packages (from oauth2)
  Installing collected packages: oauth2
    Running setup.py install for oauth2
      error: could not create '/usr/local/lib/python2.7/dist-packages/oauth2': Permission denied
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/steven/build/oauth2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e2RkcV-record/install-record.txt:
      running install
  
  running build
  
  running build_py
  
  running install_lib
  
  creating /usr/local/lib/python2.7/dist-packages/oauth2
  
  error: could not create '/usr/local/lib/python2.7/dist-packages/oauth2': Permission denied
  
  ----------------------------------------
  Command /usr/bin/python -c "import setuptools;__file__='/home/steven/build/oauth2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e2RkcV-record/install-record.txt failed with error code 1
  Storing complete log in /home/steven/.pip/pip.log
  </code></pre>
  
  <p>I then tried <code>easy_install oauth2</code> and got the following error message:</p>
  
  <pre><code>error: can't create or remove files in install directory
  
  The following error occurred while trying to add or remove files in the
  installation directory:
  
      [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-4349.pth'
  
  The installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:
  
      /usr/local/lib/python2.7/dist-packages/
  
  Perhaps your account does not have write access to this directory?  If the
  installation directory is a system-owned directory, you may need to sign in
  as the administrator or "root" account.  If you do not have administrative
  access to this machine, you may wish to choose a different installation
  directory, preferably one that is listed in your PYTHONPATH environment
  variable.
  
  For information on other options, you may wish to consult the
  documentation at:
  
    http://packages.python.org/distribute/easy_install.html
  
  Please make the appropriate changes for your system and try again.
  </code></pre>
  
  <p>So then I tried doing <code>sudo apt-get install oauth2</code> and it could not be found</p>
  
  <p>I am running Ubuntu 12.04 LTS I did all my sudo update and upgrades before I did anything else this morning. I am running python 2.7</p>
  
  <p>Thank you</p>