ImportError: cannot import name 'abs'

后端 未结 9 1861
我寻月下人不归
我寻月下人不归 2020-12-17 18:42

I got problem while doing object detection using tensorflow-gpu

I was follwing the youtube tutorials :https://www.youtube.com/watch?v=Rgpfk6eYxJA

I\'m trying

9条回答
  •  感动是毒
    2020-12-17 19:28

    • Edit:

    Create a virtual env and install TF-GPU, Its faster and safer.

    • Original Answer:

    OS : Ubuntu 18.04.1

    Python Version 3.6

    Solution :

    Uninstalled tensorflow 1.10

    python3 -m pip uninstall tensorflow

    Re-installed it again

    python3 -m pip install tensorflow==1.8.0

    This issue is created cause of older versions of tensorflow dependencies like protobuff and others which gets installed during tensorflow installation, So if you wanna use tensorflow 1.10 you have to uninstall rest of the dependencies or upgrade them.

    In case you want to install 1.10.1 then you have to remove these packages

    absl-py
    astor
    gast 
    grpcio 
    markdown 
    numpy 
    protobuf 
    setuptools 
    six 
    tensorboard 
    tensorflow 
    termcolor 
    werkzeug 
    wheel
    protobuf
    

    then do sudo python3 -m pip uninstall tensorflow In case a tensorflow is installed in root user then install it using python3 -m pip install tensorflow --user --no-cache

    IF you still face this problem then repeat all the steps above and do find ~/ -name tensorflow and delete every folder that pops up and retry installation.

提交回复
热议问题