【发布时间】:2019-09-10 19:17:15
【问题描述】:
导入失败并出现以下错误:
C:\Users\bhush>py -3.6-64 Python 3.6.6(v3.6.6:4cf1f54eb7,2018 年 6 月 27 日,03:37:03)[MSC v.1900 64 位(AMD64)] 在 win32 上 输入“help”、“copyright”、“credits”或“license”了解更多信息。
将张量流导入为 tf 回溯(最近一次通话最后): 文件“”,第 1 行,在 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow__init__.py”,第 34 行,在 从 tensorflow._api.v1 导入兼容 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_api\v1\compat__init__.py”,第 21 行,在 从 tensorflow._api.v1.compat 导入 v1 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_api\v1\compat\v1__init__.py”,第 643 行,在 'tensorflow_estimator.python.estimator.api._v1.estimator')) 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\tools\component_api_helper.py”,第 56 行,在 package_hook child_pkg = importlib.import_module(child_package_str) 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\importlib__init__.py”,第 126 行,在 import_module return _bootstrap._gcd_import(name[level:], package, level) 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator__init__.py”,第 8 行,在 从 tensorflow_estimator._api.v1 导入估计器 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator_api\v1\estimator__init__.py”,第 8 行,在 从 tensorflow_estimator._api.v1.estimator 导入实验 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator_api\v1\estimator\experimental__init__.py”,第 8 行,在 从 tensorflow_estimator.python.estimator.canned.dnn 导入 dnn_logit_fn_builder 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator__init__.py”,第 25 行,在 导入 tensorflow_estimator.python.estimator.estimator_lib 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\estimator_lib.py”,第 22 行,在 从 tensorflow_estimator.python.estimator.canned.baseline 导入 BaselineClassifier 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\canned\baseline.py”,第 65 行,在 从 tensorflow_estimator.python.estimator 导入估计器 文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py”,第 1708 行,在 类 EstimatorV2(估计器): EstimatorV2 中的文件“C:\Users\bhush\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py”,第 1711 行 export_savedmodel = deprecation.HIDDEN_ATTRIBUTE AttributeError:模块“tensorflow.python.util.deprecation”没有属性“HIDDEN_ATTRIBUTE”
我试图安装 tensorflow nightly build。我有 CUDA 10 和 cuDNN 7.3.0.29。 TensortFlow py -3.6–64 -m pip install tf-nightly-gpu
然后我导入 tensorflow,我得到了堆栈跟踪。我试图了解失败的可能原因。
【问题讨论】:
-
请添加更多有关您尝试过什么以及在做什么事情时遇到此错误的上下文。
-
编辑描述。
标签: tensorflow