ClaudeCode最新版本安装

📅 2026/7/2 3:25:09
ClaudeCode最新版本安装
PowerShell使用官方 irr 命令安装报错具体清空查看步骤 3-3.1Windows默认cmd窗口使用WinGet官方命令可正常安装完整安装步骤请查看步骤 4Windows推荐此安装方式1.npm安装Claude code1.1 安装nodejs推荐默认下一步直到完成安装。如修改安装目录需调整系统环境变量# nodejs下载地址 https://nodejs.org/zh-cn/download1.2 安装git推荐默认下一步直到完成安装。如修改安装目录需调整系统环境变量# git下载地址 https://git-scm.com/install/windows1.3 确认nodejs和git安装完成windows验证win R 打开命令行窗口执行C:\Users\35900node -v v24.15.0 C:\Users\35900npm -v 11.12.1 C:\Users\35900git -v git version 2.53.0.windows.31.4 安装和卸载Claude code命令# 安装claude code,使用国内加速镜像 npm install -g anthropic-ai/claude-code --registryhttps://registry.npmmirror.com # 卸载claude code npm uninstall -g anthropic-ai/claude-code1.5 安装后报错claude -v1.6 安装失败原因官方修改了Claude code cli ,只支持Native原生方式安装新的安装或者本地版本自动更新后就用不了了官方说明从 JavaScript 转向原生二进制文件CLI 现在通过跨平台的可选依赖项启动原生 Claude Code 二进制文件不再使用打包的 JavaScript。这通常会带来更好的性能和启动速度。# anthropics说明文档 https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md2.其他安装方法irm命令使用windows powershell终端winget命令使用windows原生的cmd窗口# 安装方法展示 https://github.com/anthropics/claude-code/tree/main3.PowerShell安装Claude code3.1 报错信息如下查看代码2尝试使用下边命令我没有测试直接使用WinGet安装了# 1. 先下载脚本 irm https://claude.ai/install.ps1 -OutFile claude_install.ps1 # 2. 然后执行 .\claude_install.ps14.WinGet安装Claude codewin R 打开命令行窗口执行安装命令# 安装Claude code winget install Anthropic.ClaudeCode# 安装 C:\Users\35900winget install Anthropic.ClaudeCode The msstore source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machines 2-letter geographic region to be sent to the backend service to function properly (ex. US). Do you agree to all the source agreements terms? [Y] Yes [N] No: Y Found Claude Code [Anthropic.ClaudeCode] Version 2.1.114 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.114/win32-x64/claude.exe ██████████████████████████████ 234 MB / 234 MB Successfully verified installer hash Starting package install... Path environment variable modified; restart your shell to use the new value. Command line alias added: claude Successfully installed # 版本查看 C:\Users\35900claude -v 2.1.114 (Claude Code)5.安装cc-switch5.1 下载对应系统的版本我是windows所以下载红框标记版本# 当前最新版本是v3.13.0 https://github.com/farion1231/cc-switch/releases/tag/v3.13.05.2 解压zip压缩包点击cc-switch.exe即可使用5.3 cc-switch配置模型在自己购买的api平台上获取apikey比如我的是minimax添加指定模型选择对应的模型厂商复制apikey添加即可7.启动Claude code# 在windows终端命令行执行 claude启动后一直按enter键即可安装完成可以看到大模型是minimax2.7说明已经加载了cc-switch配置的minimax