Tensorflow: why 'pip uninstall tensorflow' cannot find tensorflow
<p>I'm using Tensorflow-0.8 on Ubuntu14.04. I first install Tensorflow from sources and then setup Tensorflow for development according to the <a href="https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html#setting-up-tensorflow-for-development" rel="nofollow">official tutorial</a>. When I want to uninstall tensorflow using the following command</p>

<pre><code>sudo pip uninstall tensorflow
</code></pre>

<p>I encountered the following error:</p>

<pre><code>Can't uninstall 'tensorflow'. No files were found to uninstall
</code></pre>

<p>Could anyone tell me where is wrong?</p>

<p>For your reference, the output of 
<code>pip show tensorflow</code> is</p>

<pre><code>Name: tensorflow
Version: 0.8.0
Location: /home/AIJ/tensorflow/_python_build
Requires: numpy, six, protobuf, wheel
</code></pre>

<p>But I actually find another Tensorflow directory at </p>

<pre><code>/usr/local/lib/python2.7/dist-packages/tensorflow
</code></pre>

<p>Besides, I also have a question about the general usage of Python. I have seen two quite similar directories in my system, i.e.</p>

<pre><code>/usr/lib/python2.7/dist-packages
/usr/local/lib/python2.7/dist-packages
</code></pre>

<p>Could any one tell me the differences between them? I noticed that everytime I use <code>sudo pip install &lt;package&gt;</code>, the package will be installed to <code>/usr/local/lib/python2.7/dist-packages</code>, could I instead install packages into <code>/usr/lib/python2.7/dist-packages</code> using <code>pip install</code>?</p>

<p>Thanks a lot for your help in advance!</p>

<p>I believe pip isn't installed for python2.7</p>

<p>try :</p>

<pre><code>pip -V
</code></pre>

<p>On my system for instance it says :</p>

<pre><code>pip 8.1.2 from /usr/lib/python3.4/site-packages (python 3.4)
</code></pre>

<p>So basically using <code>pip uninstall</code> will only remove packages for python3.4 (and not python2.7).</p>

<p>So I don't use pip binary as such, and rather, call pip module from inside python.</p>

<p>In your case :</p>

<pre><code>python2.7 -m pip uninstall tensorflow
</code></pre>

python tensorflow uninstall