1.安装npm

下载地址:https://nodejs.org/en/download

2.安装claude-code

npm install -g --allow-scripts=@anthropic-ai/claude-code @anthropic-ai/claude-code

3.更新claude-code

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
claude update
# 如果报错16位不兼容
npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code --allow-scripts=@anthropic-ai/claude-code --registry=https://registry.npmjs.org

4.验证版本

claude --version
最后修改:2026 年 09 月 17 日
如果觉得我的文章对你有用,请随意赞赏