iflow bot无法找到iflow cli

iflow-bot gateway run

iflow 未安装,正在自动安装…

自动安装依赖中…
npm warn deprecated phin@3.7.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 5 packages, and changed 229 packages in 12s

42 packages are looking for funding
run npm fund for details
安装后仍检测不到 iflow,请检查安装过程 系统win11,无wsl,node -v
v22.19.0

辛苦在终端执行一下 iflow –version 看看有没有什么响应。

I can see you’ve run –version - this appears to be a partial command.

Did you want to check the version of a specific tool? For example:

  • git --version - Git version
  • python --version - Python version
  • node --version - Node.js version
  • npm --version - npm version

Which tool version would you like to check?

{ "session-id": "session-7b2276ad-a00b-4de2-8ff0-4d1c8305240a", "conversation-id": "24db6ba0-f6f3-4f5d-93c3-e976f806e17e", "assistantRounds": 1, "executionTimeMs": 6016, "tokenUsage": { "input": 18752, "output": 86, "total": 18838 } }

iflow -v
0.5.14

修复了,升级试试。

pip install --upgrade iflow-bot

/$$ /$$$$$$$$ /$$ /$$$$$$$ /$$
|/| $$/| $$ | $$*** $$ | $$
/$$| $$ | $$ /$$$$$$ /$$ /$$ /$$ | $$ \ $$ /$$$$$$ /$$$$$$
| $$| $$$$$ | $$ /$$_ $$| $$ | $$ | $$ /$$$$$$| $$$$$$$ /$$__ $$|_ $$/
| $$| $$
/ | $$| $$ \ $$| $$ | $$ | $$|/| $$** $$| $$ \ $$ | $$
| $$| $$ | $$| $$ | $$| $$ | $$ | $$ | $$ \ $$| $$ | $$ | $$ /$$
| $$| $$ | $$| $$$$$$/| $$$$$/$$$$/ | $$$$$$$/| $$$$$$/ | $$$$/
|/|/ |/ _/ _____/_/ |_______/ __/ _*/

Multi-channel AI Assistant (powered by iflow)

iflow 未安装,正在自动安装…

自动安装依赖中…
npm warn deprecated phin@3.7.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 5 packages, and changed 229 packages in 10s

42 packages are looking for funding
run npm fund for details
安装后仍检测不到 iflow,请检查安装过程 还不行

最新版本可以了吗?

不行,iflow-bot-0.1.7

不过,更新时有个无效包目录警告:WARNING: Ignoring invalid distribution ~flow-bot

我的iflow cli用npm,这个用的pip。

问题原因:iflow-bot 包中的 check_iflow_installed() 函数使用 subprocess.run([“iflow”, “–version”]) 检测
iflow,但在 Windows 上:

  • iflow 是一个 .CMD 批处理文件
  • subprocess.run() 不使用 shell=True 时,无法找到并执行 .CMD 文件

修复内容:

  1. check_iflow_installed():添加 shell=True 参数
  2. _start_acp_server():改用 create_subprocess_shell() 来启动 ACP 服务

遇到了一模一样的问题,这个是问iflow让他查看问题的,已解决,只能说iflow牛逼

我让iflow弄,差点把我python卸载

我是新建一个conda环境然后让iflow弄的,这样即便弄毁了把这个conda环境清了就行了,你直接在系统py pip的吗,那你挺胆大

这个问题昨天就修复了,可以试试新版本

我刚试过了,确实可以,不过有时会报Prompt timeout

1 个赞