我正在使用 conda(通过 YAML 创建的 env)+ pip 在我的 Linux Mint 机器上设置 Tensorflow v1.13.1 环境。设置后,每当我尝试导入时,tf.estimator我都会收到AttributeError标题中描述的信息:
AttributeError: module 'tensorflow' has no attribute 'estimator'
Run Code Online (Sandbox Code Playgroud)
tf.estimator很好地导入。$ conda update -n base -c defaults conda
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/usr/share/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/usr/share/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, …Run Code Online (Sandbox Code Playgroud)