ImportError: cannot import name ‘abs’

This worked for me in ubuntu 18.0.4

pip uninstall tensorflow protobuf --yes
find $CONDA_PREFIX -name "tensorflow" | xargs -Ipkg rm -rfv pkg
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl --no-cache-dir

Solution found from GitHub: ImportError: cannot import name ‘abs’ #20778.

Leave a Comment

tech