16

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
  • Did you try first importing numpy and then importing tensorflow? May 13, 2016 at 21:10

2 Answers 2

18

Depends on how you install it considering the fact that there are multiple ways to do it here. Most generic way people do it is through pip, check using:

sudo pip show tensorflow

Uninstall using:

sudo pip uninstall protobuf
sudo pip uninstall tensorflow

Install it using:

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
10
  • 12
    You shall not sudo pip.
    – runDOSrun
    May 27, 2016 at 12:57
  • 3
    @runDOSrun why not? Jan 14, 2017 at 0:22
  • 2
    why do you need protobuf to uninstall tensorflow? Jan 14, 2017 at 0:23
  • 1
    Why protobuf???
    – SmallChess
    Jan 13, 2018 at 4:01
  • @PseudoAj Why ??
    – SmallChess
    Jan 13, 2018 at 4:01
5

When running in conda env or any virtual env sudo doesn't work. So you can use:

python3 -m pip uninstall protobuf    
python3 -m pip uninstall tensorflow-gpu

python3 -m is safest way to ensure that you are using pip3 and not pip2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .