ubuntu中Conda环境安装Openclaw
第一步 配置环境
安装curl,后续通过crul命令安装。
1. 更新包列表
sudo apt update2. 使用命令安装curl
sudo apt install curl3. 验证curl是否成功安装
curl --version这个命令会显示curl的版本信息,如果没有错误信息,这意味着curl已经成功安装在你的系统上了。
二. 创建conda环境并激活:
conda create --name openclaw python=3.12 conda activate openclaw三. 在这个 conda 环境里安装 Node.js、npm 和 git
conda install -c conda-forge nodejs git -y1.检查一下自己当前到底会用哪里的 Node/npm:
which node which npm npm config get prefix如果输出类似:
/home/alex/anaconda3/envs/openclaw/bin/node /home/alex/anaconda3/envs/openclaw/bin/npm /home/alex/anaconda3/envs/openclaw那说明现在主要走的是 conda 环境。
2.OpenClaw 官方文档要求 Node 推荐 24,或至少 22.14+,因此需要确认一下版本
node -v npm -v四. 没问题的话,开始安装 OpenClaw 命令行工具
npm install -g openclaw@latest安装完成,warning是依赖包提示,不影响安装。下面继续检查:
which openclaw openclaw --version如果which openclaw输出类似:
/home/alex/anaconda3/envs/openclaw/bin/openclaw说明它确实装在你的 conda 环境里。
五. 初始化配置,并安装后台 daemon 服务
openclaw onboard --install-daemonopenclaw devices list六. 最后我选择浏览器启动,因此还需要进一步进行配置
1. 按Ctrl+Alt+T新打开一个终端,然后激活环境
conda activate openclaw2. 查看待批准设备
openclaw devices list它应该会列出一个待批准的设备,ID 类似你页面上这个:
ff125464-8362-41ea-9377-8fc095fd0983. 批准这个设备
直接复制页面给你的命令执行:
openclaw devices approve ff125464-8362-41ea-9377-8fc095fd098注意:你要以你页面实际显示的完整 ID 为准。
4. 回到网页重新连接
批准完成后,回到这个网页,点:
连接5.特殊情况,批准之后出现:
[openclaw] Could not start the CLI.
[openclaw] Reason: unknown requestId
[openclaw] Debug: set OPENCLAW_DEBUG=1 to include the stack trace.
[openclaw] Try: openclaw doctor
[openclaw] Help: openclaw --help
(openclaw) alex@Alex:~$ openclaw devices list
这个不是安装失败,OpenClaw 已经装好了。现在的问题是:你批准的这个requestId已经过期/被新的请求替换了,所以提示:
Reason: unknown requestId官方文档也说明:如果浏览器重新发起配对,旧的 pending request 会被新的requestId替代,所以要在批准前重新运行openclaw devices list,用最新的 requestId。
你现在按这个顺序来:
(1) 不要关网页,先在终端运行
openclaw devices list它会显示当前待批准的请求。
(2)找里面最新的requestId
不要再用刚才这个旧的,要复制openclaw devices list里显示的新 ID。
(3)用新的 ID 批准
格式是:
openclaw devices approve 新的requestId比如:
openclaw devices approve xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx(4)回到网页点“连接”
批准成功后,回到浏览器页面,点:
连接或者刷新页面后再连接。
七.安装成功
八.配置DeepSeek模型
1. 进入配置向导,如图所示开始配置
openclaw configure