Tensorflow:为什么 'pip uninstall tensorflow' 找不到 tensorflow [英] Tensorflow: why 'pip uninstall tensorflow' cannot find tensorflow
问题描述
我在 Ubuntu14.04 上使用 Tensorflow-0.8.我首先从源代码安装 Tensorflow,然后根据 官方教程.当我想使用以下命令卸载 tensorflow 时
sudo pip 卸载 tensorflow
我遇到以下错误:
无法卸载tensorflow".没有找到要卸载的文件
谁能告诉我哪里错了?
供您参考,输出pip show tensorflow
是
名称:tensorflow版本:0.8.0位置:/home/AIJ/tensorflow/_python_build需要:numpy、6、protobuf、wheel
但我实际上在
找到了另一个 Tensorflow 目录/usr/local/lib/python2.7/dist-packages/tensorflow
另外,我还有一个关于Python的一般用法的问题.我在我的系统中看到了两个非常相似的目录,即
/usr/lib/python2.7/dist-packages/usr/local/lib/python2.7/dist-packages
谁能告诉我它们之间的区别?我注意到每次使用 sudo pip install
时,包都会安装到 /usr/local/lib/python2.7/dist-packages
,可以我改为使用 pip install
?
/usr/lib/python2.7/dist-packages
非常感谢您的帮助!
这可能是因为您没有 使用 pip
安装 Tensorflow,但使用 python setup.py develop
作为你的 link 显示.
python setup.py install
安装包,pip uninstall
可能会失败,因为它们不会留下元数据来确定安装了哪些文件.>
因此,您应该能够使用 develop
cd/home/AIJ/tensorflow/_python_buildpython setup.py develop --uninstall
回答关于在 /usr/lib/python2.7
和 /usr/local 下创建的两个
它已经存在 很棒的 Stack Overflow 回答关于这个话题.dist-package
的第二个(有趣的)问题/lib/python2.7
PS:Tensorflow 是一个很好的库,你应该考虑不要卸载它:)
I'm using Tensorflow-0.8 on Ubuntu14.04. I first install Tensorflow from sources and then setup Tensorflow for development according to the official tutorial. When I want to uninstall tensorflow using the following command
sudo pip uninstall tensorflow
I encountered the following error:
Can't uninstall 'tensorflow'. No files were found to uninstall
Could anyone tell me where is wrong?
For your reference, the output of
pip show tensorflow
is
Name: tensorflow
Version: 0.8.0
Location: /home/AIJ/tensorflow/_python_build
Requires: numpy, six, protobuf, wheel
But I actually find another Tensorflow directory at
/usr/local/lib/python2.7/dist-packages/tensorflow
Besides, I also have a question about the general usage of Python. I have seen two quite similar directories in my system, i.e.
/usr/lib/python2.7/dist-packages
/usr/local/lib/python2.7/dist-packages
Could any one tell me the differences between them? I noticed that everytime I use sudo pip install <package>
, the package will be installed to /usr/local/lib/python2.7/dist-packages
, could I instead install packages into /usr/lib/python2.7/dist-packages
using pip install
?
Thanks a lot for your help in advance!
It could be because you didn't install Tensorflow using pip
, but using python setup.py develop
instead as your link shows.
pip uninstall
is likely to fail if the package is installed using python setup.py install
as they do not leave behind metadata to determine what files were installed.
Therefore, you should be able to unistall Tensorflow with the option -u
or --unistall
of develop
cd /home/AIJ/tensorflow/_python_build
python setup.py develop --uninstall
To answer for the second (interestring) question about the two dist-package
created under /usr/lib/python2.7
and /usr/local/lib/python2.7
it exists already a great Stack Overflow answer on the topic.
PS: Tensorflow is a good library, you should consider not uninstall it :)
这篇关于Tensorflow:为什么 'pip uninstall tensorflow' 找不到 tensorflow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!