2

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.enter image description here

chandan
  • 964
  • 1
  • 19
  • 26

3 Answers3

2

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.

gdlmx
  • 6,479
  • 1
  • 21
  • 39
  • do you mean `python2.7/dist-packages/` ?? – chandan Apr 27 '16 at 23:46
  • The easiest way is to search for any file with "tensorflow" in the name under your python installation folder. If you are not sure, run `python -c "print sys.path"` to see. – gdlmx Apr 27 '16 at 23:49
  • the directory `site-packages` is empty. :( – chandan Apr 28 '16 at 00:00
  • Please check the updated answer and this [post](http://stackoverflow.com/questions/7332299/trace-python-imports) – gdlmx Apr 28 '16 at 00:16
0

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.

Ishrak
  • 509
  • 1
  • 9
  • 17
0

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

Karthik K N
  • 71
  • 3
  • 7