title: PermissionError While Installing TensorFlow Using Virtualenv
body: <p>I was installing tensorflow using virtualenv. The following commands worked fine.</p>
  
  <pre><code>$ virtualenv ~/.tensorflow/bin/activate
  $ pip install --upgrade tensorflow
  </code></pre>
  
  <p>But if I try:</p>
  
  <pre><code>$ virtualenv ~/.tensorflow/bin/activate
  $ pip3 install tensorflow
  </code></pre>
  
  <p>I got PermissionError:</p>
  
  <p><a href="https://i.stack.imgur.com/uiibB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uiibB.png" alt="enter image description here"></a></p>
  
  <p>I tried the last command with sudo.</p>
  
  <pre><code>$ sudo pip3 install tensorflow
  </code></pre>
  
  <p>Then it seems like I can import tensorflow outside virtualenv.
  (Is it correct?)</p>
  
  <p>How can I install tensorflow for python 3 only inside virtualenv?</p>
  
  <p>By the way, I am using pip 9.0.1 for both python 2.7.12 and 3.5.2.</p>
  
  <p>The version of virtualenv is 15.0.1.</p>