title: homebrew error The following directories are not writable by your user:
body: <p>When I tried to install Python 3 through Homebrew,
  I got the following message. How can I fix this error?</p>
  <p>I’m not familiar with command line, so I would appreciate
  if you could provide me with the exact commands to execute
  to resolve the issue.</p>
  <pre class="lang-none prettyprint-override"><code>Error: The following directories are not writable by your user:
  /usr/local/share/man/man7
  
  You should change the ownership of these directories to your user.
    sudo chown -R $(whoami) /usr/local/share/man/man7
  
  And make sure that your user has write permission.
    chmod u+w /usr/local/share/man/man7
  </code></pre>