1
ImportError: cannot import name 'abs'

The fixes I already tried were going into my Anaconda environment, activating it and running this command:

pip uninstall tensorflow protobuf --yes

pip install --ignore-installed --upgrade tensorflow-gpu 

Now the error is the same.

1 Answers1

1

Is there a reason why you're installing in pip if you use Anaconda? tensorflow-gpu is available in anaconda. Try

conda remove tensorflow*
conda remove protobuf
pip uninstall tensorflow*
pip uninstall protobuf
conda install tensorflow-gpu
user2653663
  • 2,818
  • 1
  • 18
  • 22
  • Thanks for your quick reply. I tried this but it returned the following error when importing tensorflow in my code: module 'tensorflow.python.training.checkpointable' has no attribute 'CheckpointableBase' –  Aug 06 '18 at 12:57
  • You could try to create a new anaconda environment as well: https://stackoverflow.com/a/51397065/2653663 The errors suggests that it's a broken tensorflow installation. – user2653663 Aug 06 '18 at 13:19