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

相关推荐
VIP_CQCRE3 小时前
Claude Code 接入 NanoBanana MCP:用 Ace Data Cloud 在开发对话里生成与编辑图片
ai绘画·mcp·claude code·nanobanana·ace data cloud
范中勤4 小时前
Agent IDE 双层异步调用机制:前端流式与后端多分支调度,到底各自解决什么问题
llm·agent·claude code·subagent·异步架构
浩风祭月21 小时前
Claude Haiku 5.5来了:适合哪些任务?“便宜75%”为什么不是会员降价
claude·ai模型·claude code·claude haiku
Maynor9963 天前
让 AI 编程助手学会做视频、做 PPT:Agent Skills 入门与安装全指南
人工智能·aigc·ai编程·效率工具·cursor·claude code
Maynor9964 天前
开源12个电商出图Agent Skills:GPT Image 2.5一键出图
gpt·ai绘画·跨境电商·claude code·agent skills·gpt image
️公子4 天前
Claude Code 2.1.289 补上四个 deny 缺口:Agent 权限匹配器的规范化、分层裁决与回归语料
软件工程·ai agent·权限控制·claude code·安全工程
Orange_sparkle11 天前
langgraph快速入门
学习·ai·typescript·deepseek·claude code