python - 为 "Do you want to continue (y/n, default n)"绕过 "setup.py"?

标签 python bash shell installation

我想通过 shell 脚本绕过“你想继续吗(y/n,默认 n)”提示。

我试过:

python setup.py install --force

python setup.py install
wait
y

两者都不行......有人有其他想法吗?

最佳答案

如果多次显示这个问题,只需执行以下操作:

yes | command

然而,这也会解决所有其他问题。如果您想要更复杂的东西,请查看 expect .

关于python - 为 "Do you want to continue (y/n, default n)"绕过 "setup.py"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7973986/

相关文章:

python - Python实现的简单并发

linux - 如果没有按下任何键,Bash 执行倒计时

bash - 如何在 bash 中拆分由/分隔的字符串

c - 我如何知道对特定程序使用哪个 exec 命令?

Bash 脚本箭头键产生奇怪的字符

mysql - 如何使用 shell 模拟并发 SQL 命令

python - 上传文件时无法通过 'tuple' 对象没有属性 'startswith' 错误

python - 银行交易分类的 Tensorflow 实现

python - 如何在 python xmlrpc 服务器的 regested 函数中获取请求的 ip 地址

bash - awk比较两个文件