需要 tensorflow-gpu 时“没有名为 tensorflow 的模块”

液晶显示器

我构建了一个 python tensorflow 包并上传到 ml 引擎上运行。

“tensorflow-gpu==1.8.0”(无 tensorflow)在我的 setup.py 中设置为必需。

ML 引擎运行在“import tensorflow as tf”时失败,说“没有名为 tensorflow 的模块”。

当我只需要“tensorflow==1.8.0”时,ML 引擎运行正常,但我相信 tensorflow-gpu 需要使用 GPU。

任何想法如何解决这个问题?

谢谢

雷电80

--runtime-version=1.8提交作业时需要设置因此,您无需在 setup.py 中手动指定 TF。事实上,如果这是你唯一需要的包,你可以完全省略 setup.py。

2018/06/29 更新

说明:不同版本的 TensorFlow 需要不同版本的 NVIDIA 驱动程序和软件堆栈。--runtime-version保证具有的驱动程序TensorFlow的特定版本的正确版本。从技术上讲,您可以tensorflow-gpu在 setup.py 中设置 的版本,但该版本必须与--runtime-version您选择的 NVIDIA 堆栈兼容(默认为非常旧的 TF 1.0)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Windows 上的 Tensorflow-gpu:ImportError:没有名为 _pywrap_tensorflow 的模块

ModuleNotFoundError:没有名为“ tensorflow”的模块

Tensorflow 没有名为 _pywrap 的模块

即使安装了 tensorflow-gpu,Keras 也会给出错误“ModuleNotFoundError:没有名为‘tensorflow’的模块”

Tensorflow导入错误:没有名为'tensorflow'的模块

Tensorflow - 没有名为“_pywrap_tensorflow_internal”的模块

(Tensorflow流设置)ImportError:没有名为tensorflow的模块

导入keras时出错ModuleNotFoundError:没有名为“ tensorflow.examples”的模块;'tensorflow'不是包

ModuleNotFoundError:Jupyter Notebook中没有名为“ tensorflow”的模块

ModuleNotFoundError:没有名为“ tensorflow.contrib.framework”的模块

安装后没有名为“ tensorflow_examples”的模块

ModuleNotFoundError:没有名为“ tensorflow.examples”的模块

ImportError:没有名为“ tensorflow.core”的模块

没有名为'_pywrap_tensorflow_internal'的模块

无法导入Tensorflow“没有名为copyreg的模块”

ModuleNotFoundError:anaconda中没有名为“ tensorflow”的模块

没有名为“ _pywrap_tensorflow”的模块

没有名为'tensorflow_probability'的模块

导入错误:没有名为“tensorflow”的模块

ModuleNotFoundError:没有名为“ tensorflow.tensorboard.tensorboard”的模块

Tensorflow对象检测:ImportError:没有名为nets的模块

ImportError:没有名为“ tensorflow.contrib.data”的模块

ModuleNotFoundError:没有名为“tensorflow.python”的模块Anaconda

错误-没有名为'_pywrap_tensorflow'的模块

ModuleNotFoundError:没有名为“ tensorflow.examples.tutorials”的模块

ModuleNotFoundError:没有名为“ tensorflow”的模块与代码

jupyter ModuleNotFoundError:没有名为 Tensorflow 或 keras 的模块

ModuleNotFoundError:没有名为“ numpy.core._multiarray_umath”的模块(安装TensorFlow时)

在C ++中嵌入python时如何修复“ ImportError:没有名为'tensorflow'的模块”