安装并使用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

相关推荐
学心理学的程序员3 天前
anydoc:Firecrawl 出的 Rust 文档转 Markdown,4ms 转换、14 种格式干翻 MarkItDown
开发语言·后端·rust·开源·firecrawl·claude code·anydoc
peijiping5 天前
AI多智能体解惑:父子子智能体 vs 团队智能体,为什么主流IDE默认只用前者?
人工智能·ai agent·claude code
creator_Li6 天前
Claude Code 源码分析(九):子 Agent 如何分叉、继续与回到父会话
claude code
creator_Li6 天前
Claude Code 源码分析(八):Memory 如何被写入、整理与按需召回
claude code
AI工具人PM产品经理7 天前
Claude Code skill 自建还是引入?3 个开源项目的改造判断标准
开源软件·技术选型·claude code·技能包·自建vs引入
VIP_CQCRE11 天前
用 Ace Data Cloud 接入 Claude Code:一个 Token 打通终端、VS Code 与 GitHub Actions
api·ai编程·开发工具·claude code·ace data cloud
ArkAPI12 天前
Claude Code 连发安全修复:AI 编程 Agent 的权限,正在成为新的“安全事故高发区”
人工智能·大模型·api·codex·ai工具·claude code·arkapi
peijiping13 天前
大模型 API 缓存命中率深度解析:OpenAI / DeepSeek / Anthropic 三家机制对比与智能体端实践 (学习笔记)
ai agent·claude code·缓存命中
TonyLee01713 天前
Claude Code + DeepSeek:服务器安装与使用笔记
linux·服务器·deepseek·claude code