安装并使用claude code

一 安装claude

参考:

Claude Code 安装与使用 | 菜鸟教程

报错:

复制代码
PS C:\Users\leaf> irm https://claude.ai/install.ps1 | iex
Setting up Claude Code...

✘ Installation failed

Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED


Try running with --force to override checks

✅ Installation complete!

PS C:\Users\leaf> claude --version
claude : 无法将"claude"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径
正确,然后再试一次。
所在位置 行:1 字符: 1
+ claude --version
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (claude:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

是代理问题,解决:

复制代码
PS C:\Users\leaf> $env:HTTP_PROXY = "http://127.0.0.1:7897"
PS C:\Users\leaf> $env:HTTPS_PROXY = "http://127.0.0.1:7897"
PS C:\Users\leaf> irm https://claude.ai/install.ps1 | iex
Setting up Claude Code...

✔ Claude Code successfully installed!

  Version: 2.1.121

  Location: C:\Users\leaf\.local\bin\claude.exe


  Next: Run claude --help to get started

⚠ Setup notes:
  ● Native installation exists but C:\Users\leaf\.local\bin is not in your PATH. Add it by opening: System Properties →
    Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.


✅ Installation complete!

然后添加环境变量

把路径加入 PATH

  1. 右键「此电脑」→ 属性 → 高级系统设置
  2. 点击「环境变量」
  3. 在上半部分「用户变量」中找到 Path,双击编辑
  4. 点击「新建」,粘贴:C:\Users\leaf\.local\bin
  5. 一路点 OK 保存

然后关掉当前 PowerShell,重新打开一个新窗口,运行:

复制代码
claude --version

二 安装cc switch

参考:

CC Switch 一键切换 API | 菜鸟教程

三 claude code+deepseekV4

接入 Claude Code | DeepSeek API Docs

相关推荐
Auto FAE进阶之路11 小时前
基于VS Code+Claude Code搭建你的AI编码助手
人工智能·claude code
从负无穷开始的三次元代码生活1 天前
Claude Code官方文档精华梳理(一)——定位、快速开始、核心概念、最佳实践(单个使用)
claude code
while(1){yan}1 天前
如何使用claude code
claude code
Soari1 天前
GitHub 开源项目解析:revfactory/harness —— Claude Code 的多智能体团队架构工厂
架构·开源·多智能体协作·claude code·软件工程自动化
bryant_meng1 天前
【Claude Code】Claude Code Evolution
人工智能·大模型·vibe coding·claude code
Soari1 天前
GitHub 开源项目解析:EveryInc/compound-engineering-plugin —— 让 AI 编程从“一次性生成”走向“持续复利工程”
人工智能·开源·github·claude code
花花少年1 天前
Ubuntu系统下安装Claude Code
llm·agent·claude code
懒猫gg2 天前
Claude code笔记
claude code
周公2 天前
Claude code使用第三方算力安装配置过程
claude·qwen·claude code·open claw