【发布时间】:2021-02-17 17:20:44
【问题描述】:
我正在学习这里的教程:https://www.tensorflow.org/tutorials/keras/overfit_and_underfit
我在尝试安装和使用 tensorflow 时遇到错误。
下面的第一段代码有效:
将张量流导入为 tf
从 tensorflow.keras 导入层 从 tensorflow.keras 导入正则化器
打印(tf.版本)
但是下面的第二个代码块导致了下面的错误。
!pip install -q git+https://github.com/tensorflow/docs
将 tensorflow_docs 导入为 tfdocs
导入 tensorflow_docs.modeling
导入 tensorflow_docs.plots
ERROR: Error [WinError 2] The system cannot find the file specified while execution command git clone -q https://github.com/tensorflow/docs 'C:\Users\John\AppData\Local\Temp\pip-req-build-2i769r71' 错误:找不到命令 'git' - 您是否在 PATH 中安装了 'git'?
有一篇类似的帖子建议尝试虚拟环境,但我没有虚拟环境。我还能如何解决这个问题?
非常感谢您的帮助
【问题讨论】:
-
你安装了git吗?看起来您使用的是 Windows,所以 this 教程可能会有所帮助。
标签: python tensorflow jupyter-notebook