繁体   English   中英

如何在 mac 终端中运行此脚本?

[英]How to run this script in mac terminal?

我试图在终端中运行以下脚本:

python write_tfrecords
--dataset_dir /Users/shwaitkumar/Desktop/NLP/Text Detection/Synthetic Train Set - Detection & Recognition
--save_dir /Users/shwaitkumar/Desktop/NLP/Text Detection/untitled folder

但我无法运行它。 如果我一个一个地运行它,它会在第 1 行给出错误,即路径未定义,如果我尝试将其全部粘贴并运行,我会得到另一个错误,bash: -- command not found。 我如何在终端中运行这个脚本? 我什至创建了一个 conda 环境来运行它,但仍然是同样的错误。

您的执行方式似乎存在三个问题:

  1. write_tfrecords 应该是“write_tfrecords.py”
  2. 三行应合并为一行
  3. Arg 值(文件夹名称)中有空格,它们应该用引号引起来。

    python write_tfrecords.py --dataset_dir "/Users/shwaitkumar/Desktop/NLP/文本检测/Synthetic Train Set - 检测和识别" --save_dir "/Users/shwaitkumar/Desktop/NLP/文本检测/无标题文件夹"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM