Cannot install on Windows: The property ‘OSArchitecture’ cannot be found on this object

该报错出现在 Windows 下通过官方安装脚本(install.ps1)安装 Open Interpreter 时,脚本读取 Win32_OperatingSystem.OSArchitecture 属性失败。优先排查 PowerShell 版本,并改用已包含修复的 main 分支安装脚本。

快速结论:该报错出现在 Windows 下通过官方安装脚本(install.ps1)安装 Open Interpreter 时,脚本读取 Win32_OperatingSystem.OSArchitecture 属性失败。优先排查 PowerShell 版本,并改用已包含修复的 main 分支安装脚本。

适用环境:Windows 11 Pro 25H2;Windows PowerShell 或 PowerShell;受影响版本为 0.0.34 及更早的已发布版本。

最快修复方案:Issue 中确认的修复(#1831)已合并到 main,脚本在 Win32_OperatingSystem.OSArchitecture 不可用时会安全回退。请改用当前 main 的安装脚本,或等待从 main 切出的下一个正式发布版本(0.0.34 不包含此修复)。

注意事项:该修复只保证脚本在属性缺失时安全回退,并未在 Issue 中给出 0.0.34 的补丁式一步修复方案;若仍使用 0.0.34 的安装命令,报错可能依旧复现。

问题场景

用户在 Windows 11 Pro 25H2 上启动 PowerShell,执行官方提供的一行安装命令 irm https://www.openinterpreter.com/install.ps1 | iex,安装过程在解析脚本阶段即失败,无法继续安装 Open Interpreter。

报错原文

PS C:\Users\kitsune> irm https://www.openinterpreter.com/install.ps1 | iex
iex : The property 'OSArchitecture' cannot be found on this object. Verify that the property exists.
At line:1 char:51
+ irm https://www.openinterpreter.com/install.ps1 | iex
+                                                   ~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Expression], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.Commands.InvokeExpressionCommand

原因分析

安装脚本会从 Win32_OperatingSystem 查询 OSArchitecture 属性来判断系统架构(x64 或 ARM64)。在部分 PowerShell 环境下该属性不可用,脚本未做空值/缺失处理,于是抛出 PropertyNotFoundException。维护者确认已在 #1831 中修复:当 Win32_OperatingSystem.OSArchitecture 不可用时安全回退,并覆盖 Windows PowerShell 与 PowerShell 在 x64、ARM64 运行器上的场景。

环境排查

  • 操作系统:Windows 11 Pro 25H2(Issue 报告环境)
  • PowerShell 类型与版本:确认使用的是 Windows PowerShell(powershell.exe)还是 PowerShell(pwsh),以及具体版本号
  • Open Interpreter 版本:已发布版本 0.0.34 早于该修复,不含安全回退逻辑
  • 确认安装脚本来源是否为 main 分支,而非指向旧发布版本的安装地址

解决步骤

  1. 先确认当前 Open Interpreter / 安装脚本版本。如果对应 0.0.34 或更早版本,说明未包含 #1831 的修复。
  2. 改用包含修复的 main 分支安装脚本重新执行安装,使脚本在 OSArchitecture 缺失时走安全回退分支。
  3. 如果不想使用 main,则等待从当前 main 切出的下一个正式发布版本,再通过官方安装命令安装。
  4. 若在 main 脚本下仍报同样错误,重新抓取完整报错输出与 PowerShell 版本信息后回到 Issue 反馈。

说明:暂无确认的一步修复方案(例如针对 0.0.34 的补丁参数或环境变量),上述步骤基于维护者对 #1831 合并状态的说明。

验证方法

使用包含修复的安装脚本重新执行安装命令后,安装过程不再出现 The property 'OSArchitecture' cannot be found on this object,脚本能正常识别系统架构并继续安装流程,即为修复生效。

参考来源

OpenInterpreter/open-interpreter #1821

这个方案解决了吗?

celebrityanime
celebrityanime
文章: 25531

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注