import tensorflow出错:
from tensorflow.python.keras._impl.keras.backend import abs
ImportError: cannot import name 'abs'
解决方案:参考
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
后面安装tensorflow我改成了安装1.8.0版本,这个可以根据自己需要安装不同版本。
安装过程中出现两个问题:以下图片红色字体部分
问题1:distributed 1.21.8 requires msgpack, which is not installed.
解决:pip3 install msgpack
问题2:tensorflow-tensorboard 0.4.0 has requirement bleach==1.5.0, but you'll have bleach 3.0.2 which is incompatible.
解决:pip3 uninstall bleach
, pip3 install bleach==1.5.0
最后import tensorflow成功!!
来源:CSDN
作者:lh_lyh
链接:https://blog.csdn.net/qq_39735236/article/details/84874550