How to uninstall TensorFlow completely?

∥☆過路亽.° 提交于 2020-01-06 04:05:08

问题


I accidentally installed TensorFlow for Ubuntu/Linux 64-bit, GPU enabled. When I installed with Linux 64-bit CPU only, I am getting Segmentation fault while importing tensorflow from python console.


回答1:


First try python -v -c "import tensorflow" to find out the place of the module file. Delete any tensorflow.so or similar files.

Possible paths include $PYTHONPATH, prefix/lib/python2.7/site-packages, exec-prefix/lib/python2.7/site-packages and $HOME/lib/python2.7/site-packages

Run python -c "print sys.path" to get a full list of paths.




回答2:


After removing all the files associated with tensorflow-gpu, go to the File-Settings-Project:PycharmProjects-Project Interpreter. Look for any package related to tensorflow-gpu and remove that.




回答3:


From the tensor flow website. https://www.tensorflow.org/install/install_linux

Do the following for uninstallation:

Uninstalling TensorFlow

To uninstall TensorFlow, simply remove the tree you created. For example:

$ rm -r targetDirectory



来源:https://stackoverflow.com/questions/36902457/how-to-uninstall-tensorflow-completely

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!