【问题标题】:Install and use tensorflow_docs in Python using Jupyter notebook使用 Jupyter notebook 在 Python 中安装和使用 tensorflow_docs
【发布时间】: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


【解决方案1】:

从错误Cannot find command 'git' - do you have 'git' installed and in your PATH?看,好像没有安装git。

正如@paulicg 所说,安装 Git。按照提到的步骤here 安装 Git。谢谢!

【讨论】:

    猜你喜欢
    • 2017-01-02
    • 1970-01-01
    • 2017-06-07
    • 2022-12-01
    • 1970-01-01
    • 2018-05-02
    • 1970-01-01
    • 2018-04-10
    • 1970-01-01
    相关资源
    最近更新 更多