gpt4 book ai didi

windows - 使用GPU支持为TensorFlow创建pip包会导致0字节的simple_console_for_windows.zip

转载 作者:行者123 更新时间:2023-12-03 11:09:38 26 4
gpt4 key购买 nike

在成功构建具有GPU支持的TensorFlow之后,我试图构建pip包,但出现一个错误,提示它无法读取simple_console_for_windows.zip文件。

我已经确认该文件位于C:\tensorflow\bazel-bin\tensorflow\tools\pip_package文件夹中,但它是0字节。

这是我的pip build命令:

bazel-bin\tensorflow\tools\pip_package\build_pip_package C:/tmp/tensorflow_pkg

这是完整的错误:
Unzipping simple_console_for_windows.zip to create runfiles tree...
[./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip or
./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.zip, and cannot find ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.ZIP, period.

我在Windows 10上,使用Bazel 0.16.1,Tensorflow 1.11,CUDA 9.2和CUDNN 7.2.1。

我的构建命令是:
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

有人知道我可以尝试或检查些什么来构建pip包吗?

最佳答案

这是解决方法的未解决问题。 https://github.com/tensorflow/tensorflow/issues/20332

  • 编辑以下文件以删除所有带有“.zip”的行。

    bazel-out/x64_windows-opt/bin/tensorflow/tools/pip_package/simple_console_for_windows.zip-0.params
  • 运行以下命令行以生成所需的zip文件,在我的情况下约为107 MB。详细选项将列出所有文件。

    外部\bazel_tools\tools\zip\zipper\zipper.exe vcC bazel-out/x64_windows-opt/bin/tensorflow/tools/pip_package/simple_console_for_windows.zip @ bazel-out/x64_windows-opt/bin/tensorflow/tools/pip_package/simple_console_for_windows.zip-0.params
  • 现在,原始的pip build命令将构建一个whl。
  • 关于windows - 使用GPU支持为TensorFlow创建pip包会导致0字节的simple_console_for_windows.zip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52394305/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com