title: Python - [Errno 13] Permission denied
body: <p>I am trying to install a python script on my mac.<br>
  When I run $ <code>python setup.py install</code> I get the following message:</p>
  
  <blockquote>
    <p>running install<br>
    error: can't create or remove files in install directory</p>
    
    <p>The following error occurred while trying to add or remove files in the
    installation directory:</p>
  
  <pre><code>[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1668.write-test'
  </code></pre>
    
    <p>The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:</p>
  
  <pre><code>/Library/Python/2.7/site-packages/
  </code></pre>
    
    <p>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.</p>
    
    <p>For information on other options, you may wish to consult the
    documentation at:</p>
    
    <p><a href="http://peak.telecommunity.com/EasyInstall.html" rel="nofollow">http://peak.telecommunity.com/EasyInstall.html</a></p>
    
    <p>Please make the appropriate changes for your system and try again.</p>
  </blockquote>
  
  <p>How can I fix this?</p>