ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'

environment

python3.7.6 MacOS Mojave

problem

I get the following error:

ModuleNotFoundError: No module named 'tensorflow.contrib'

Reasons to think

It's most likely due to a high version of tensorflow.

approach

You can downgrade tensorflow by the following methods.

terminal


$pip install tensorflow==1.14

Other

The following error may be the same cause, so if you see it, try the above remedy.

AttributeError: module 'tensorflow' has no attribute 'contrib' 
AttributeError: module 'tensorflow' has no attribute 'placeholder'
AttributeError: module 'tensorflow' has no attribute 'Variable'

Finally

The specifications of tensorflow have changed too much, isn't it? I hope my mistakes help someone.

Recommended Posts

ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
No module named What to do if you get'libs.resources'
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
ImportError: No module What to do when you are told
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
What to do if you can't pipenv shell
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you can't pip install mysqlclient
What to do if you get a "No versions found" error in pipenv
What to do if yum breaks
What to do if you are addicted to Windows character code
What to do if you get "coverage unknown" in Coveralls
What to do if you can't sort files with subscripts
What to do if you can't log in as root
What to do if you can't use WiFi on Linux
What to do if Linux VLC can no longer rotate
What to do if you lose your EC2 key pair
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get a minus zero in Python
What to do if you get a UnicodeDecodeError with pip install
What to do if you can't build your project with Maven
What to do if you can't use the trash in Lubuntu 18.04.
What to do if you get an Undefined error:'Module_six_moves_urllib_parse' object has no attribute'urlencode' on MacOS
Let's summarize what you want to do.
What to do if you install openCV3 and make a symbolic link, but when you do "import cv2", "No module named'cv2'" appears
What to do if you can't find well with grep's -f option
What to do if you can't find PDO in Laravel or CakePHP
What to do if you couldn't send an email to Yahoo with Python.
What to do if you can't use scikit grid search in Python
What to do if you forget your login password on Manjaro Linux
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if you get stuck during Anaconda installation on Linux
What to do if No Python documentation found for ... appears in pydoc
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you can't install with pip in babun environment
What to do if you get Could not fetch URL 443 with pip
What to do if you get an error when installing Dlib (Ubuntu)
What to do if pipreqs results in UnicodeDecodeError
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if rails s doesn't work
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do if Docker-sync suddenly stops working
ModuleNotFoundError: No module named'py4j'
ModuleNotFoundError: No module named'flask_sqlalchemy'
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do if you get the error Target WSGI script'/var/www/xxx/xxx.wsgi' cannot be loaded as python module
What to do if you get angry with swapon failed: Operation not permitted
What to do if you get an error when installing python with pyenv
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if pip install fails in Xcode 5.1
What to do if SciPy installation fails on CentOS
Links to do what you want with Sublime Text
What to do if a UnicodeDecodeError occurs in pip
pipenv shell is no longer available ... what to do?
What to do if pip install fails to install dependent libraries
What to do if sys / cdefs.h does not exist
What to do if pyenv is not enabled (zsh)