超详细:Windows 10/11 安装 DeepSeek 图文教程

云信安装大师
90
AI 质量分
4 5 月, 2025
2 分钟阅读
0 阅读

超详细:Windows 10/11 安装 DeepSeek 图文教程

引言

DeepSeek 是一款强大的 AI 助手工具,能够帮助开发者提高工作效率。本教程将手把手教你如何在 Windows 10/11 系统上安装 DeepSeek,包含详细的步骤说明、截图和常见问题解决方案。

准备工作

在开始安装前,请确保你的系统满足以下要求:

  • Windows 10/11(64位)
  • 至少 8GB RAM(推荐16GB以上)
  • 至少 20GB 可用磁盘空间
  • Python 3.8+(如果使用Python版本)
  • Git(可选,用于克隆仓库)

方法一:通过官方客户端安装(推荐)

步骤1:下载 DeepSeek

  1. 访问 DeepSeek官网
  2. 点击”下载”按钮
  3. 选择 Windows 版本下载

步骤2:安装 DeepSeek

  1. 双击下载的安装包 DeepSeek_Setup.exe
  2. 允许用户账户控制提示
  3. 选择安装语言(默认中文)
  4. 接受许可协议
  5. 选择安装位置(默认 C:\Program Files\DeepSeek)
  6. 点击“安装”按钮
代码片段
# (可选)如果你想通过命令行静默安装
Start-Process -FilePath "DeepSeek_Setup.exe" -ArgumentList "/S" -Wait

步骤3:首次运行配置

  1. 启动 DeepSeek
  2. 登录你的账号(如果没有请注册)
  3. 完成初始设置向导
  4. 选择你需要的功能模块

方法二:通过 Python pip 安装(开发者适用)

如果你更喜欢使用 Python pip,可以按照以下步骤:

步骤1:创建虚拟环境(推荐)

代码片段
python -m venv deepseek_env
deepseek_env\Scripts\activate

步骤2:安装 DeepSeek Python SDK

代码片段
pip install deepseek-sdk --upgrade

步骤3:验证安装

代码片段
import deepseek

# API密钥可以从官网获取
api_key = "your_api_key_here"
client = deepseek.Client(api_key)

# 测试简单查询
response = client.query("你好")
print(response)

Docker方式运行(高级用户)

如果你已经安装了 Docker,可以使用以下命令:

代码片段
docker pull deepseek/deepseek:latest
docker run -it --rm -p 8080:8080 deepseek/deepseek:latest

然后访问 http://localhost:8080/

API配置和使用

获取API密钥后,可以这样使用:

代码片段
import requests

url = "https://api.deepseek.com/v1/chat/completions"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "model": "deepseek-chat",
    "messages": [{"role": "user", "content": "你好"}]
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Web界面访问

无论哪种方式安装后,都可以通过浏览器访问:
http://localhost:8000/

VS Code插件集成(可选)

  1. 打开 VS Code
  2. 进入扩展市场 (Ctrl+Shift+X)
  3. 搜索 DeepSeek
  4. 点击安装按钮

CLI命令行使用示例

代码片段
deepseek-cli --prompt "帮我写一个Python爬虫"

常用参数:
--prompt : 指定查询内容
--model : 选择模型版本
--temperature : 控制创造性 (0-1)
--max-tokens : 限制响应长度

Windows服务模式运行(后台常驻)

代码片段
New-Service -Name "DeepSeekService" `
            -BinaryPathName '"C:\Program Files\DeepSeek\deepseek.exe" --service' `
            -DisplayName "DeepSeek AI Service" `
            -StartupType Automatic

Start-Service -Name "DeepSeekService"

GPU加速配置(NVIDIA显卡)

如果你的设备有NVIDIA显卡:

  1. 确认已安装CUDA工具包和cuDNN
  2. 编辑配置文件 config.yaml:
代码片段
hardware_acceleration:
    enable_gpu: true  
    cuda_version: '11.7'
  1. 重启 DeepSeek服务

检查GPU是否启用:

代码片段
nvidia-smi #应该能看到deepseek进程占用GPU资源  

FAQ常见问题解决

Q1: DLL加载错误?

A:

代码片段
# VC++运行时缺失的解决方案  
winget install Microsoft.VCRedist.2015+.x64  

Q2: Python版本冲突?

A:

代码片段
python --version #确认是3.8+  
py -0p #列出所有Python版本  
py -3.x -m pip install ... #指定版本  

Q3: API连接超时?

A:

代码片段
1.检查防火墙设置 
netsh advfirewall firewall add rule name="DeepSeek" dir=in action=allow program="C:\Program Files\DeepSeek\deepseek.exe"

2.proxy设置:
export HTTP_PROXY=http://your-proxy:port 
export HTTPS_PROXY=http://your-proxy:port 

Q4: GPU内存不足?

A:

代码片段
降低batch size:
config.yaml中修改:
model_parameters:
    batch_size:4 -> batch_size:2   
或使用CPU模式:
enable_gpu: false   

Windows任务计划定时执行

创建每日自动更新任务:

代码片段
$action = New-ScheduledTaskAction -Execute 'C:\Program Files\DeepSeek\updater.exe' -Argument '--auto'
$trigger = New-ScheduledTaskTrigger -Daily -At '3am'
Register-ScheduledTask -TaskName 'DeepSeek Auto Update' `
                       -Action $action `
                       -Trigger $trigger `
                       -RunLevel Highest 

WSL2集成方案

在WSL中访问本地Windows服务:

代码片段
export DEEPSEEK_API_URL=http://$(grep nameserver /etc/resolv.conf | awk '{print $2}'):8000 

#测试连接 
curl $DEEPSEEK_API_URL/status   

PowerShell Profile集成

添加快速启动函数到profile:

代码片段
Add-Content $PROFILE 'function ask {
    param([string]$q)
    deepseek-cli --prompt $q | Out-Host   
}'

#重载后即可使用 ask "问题内容"

Windows右键菜单快捷方式

创建注册表项实现右键调用:

代码片段
Windows Registry Editor Version5.00 

[HKEY_CLASSES_ROOT\*\shell\AskWithDeepSeek]   
@="用 DeepSeek查询..."   

[HKEY_CLASSES_ROOT\*\shell\AskWithDeepSeek\command]   
@="\"C:\\Program Files\\DeepSeek\\deepseek-cli.exe\" --prompt \"解释这个文件内容\" --input \"%1\""

双击导入后即可在文件右键菜单中使用。


希望这篇详细的教程能帮助你顺利在Windows上安装和使用DeepSeek!如有其他问题欢迎留言讨论。

原创 高质量