How to fix "module 'tensorflow' has no attribute 'estimator' " error
Finally found the issue. I had some local (non-Conda) Tensorflow packages still installed, which were higher priority in the python environment, I guess.
This link solved my issue: https://github.com/tensorflow/tensorboard/issues/2067
- Uninstall tensorflow, tensorboard
- Uninstall tb-nightly(if it is installed)
- Use "pip freeze | grep tensorflow" to check if tensorflow-estimator package has been installed. If so, uninstall it.
- Go to site-packages and remove all tensorflow folders related to tensorflow, tensorboard, tensorflow-estimator etc
- Reinstall the latest versions of tensorflow and tensorboard
The key for my issue was the sitepackages, which can be found at BOTH
~/.conda/envs/<my-env>/lib/python3.<xx>/site-packages
~/.local/lib/python3.<xx>/site-packages
Where <my-env>
is your conda environment and <xx>
is your python version.
Just rm -r <path to package>
each tensorflow package in your ~/.local/
library and reinstall the conda environment.