【问题标题】:Building tensorflow-text=2.11.0 from source fails with "rev: command not found" on Windows在 Windows 上从源构建 tensorflow-text=2.11.0 失败并显示“rev: command not found”
【发布时间】:2023-02-03 20:49:49
【问题描述】:

你可能知道,在 2.10 版本之后,tensorflow-text 不再作为 pip 包在 windows 上提供。

我尝试按照 https://github.com/tensorflow/text#build-from-source-steps 上的从源程序构建的过程进行操作,但在第 3 步失败了:

sh ./oss_scripts/run_build.sh

我有:

...
+++ python -c 'import tensorflow as tf; print('\'' '\''.join(tf.sysconfig.get_link_flags()))'
+++ awk '{print $2}'
+++ python -c 'import tensorflow as tf; print(tf.sysconfig.CXX11_ABI_FLAG)'
++ TF_ABIFLAG=0
++ HEADER_DIR='C:\Users\Gilles\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\include'
++ SHARED_LIBRARY_DIR='C:\Users\Gilles\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow'
+++ echo -l:libtensorflow_framework.so.2
+++ rev oss_scripts/configure.sh: line 88: rev: command not found
+++ cut -d: -f1
+++ rev oss_scripts/configure.sh: line 88: rev: command not found
++ SHARED_LIBRARY_NAME=

我的配置:

  • Windows 10
  • 蟒蛇10
  • Tensorflow 2.11.0(点安装)

【问题讨论】:

    标签: python tensorflow2.0


    【解决方案1】:

    您提到的这个构建脚本用于苹果系统.您可以按照以下代码使用 pip 安装 tensorflow-text -

    pip install tensorflow-text

    此外,请确保您在系统中安装了相同版本的tensorflowtensorflow_text。您可以参考link了解更多详情。

    【讨论】:

      猜你喜欢
      • 2019-07-01
      • 2011-02-12
      • 1970-01-01
      • 2022-12-25
      • 2016-01-15
      • 2022-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多