前言:最近 Manus 火得一塌糊涂啊,OpenManus 也一夜之间爆火,那么作为程序员应该来尝尝鲜
1、前期准备
FastGithub:如果有科学上网且能正常访问 github 则不需要下载此软件,此软件是提供国内直接访问 githubGit:通过 git 远程拉去 github 代码,当然也可以不用安装Anaconda或者Miniconda:python 依赖管理工具科学上网:如果想去谷歌搜索,则需要支持访问 google.com,如果不需要,则配置访问路径为 百度,请往下看
2、进入 github 下载源码
阅读官方提供的文档:OpenManus 中文文档
2.1、下载源码
下载源码分两种方式:
- 第一种是安装了 Git 的,直接通过命令
git clone https://github.com/mannaandpoem/OpenManus.git
- 第二种是直接下载 zip 包
下载 ZIP 包直接点击
2.2、准备工作
- 创建 python 虚拟环境
# 创建虚拟环境
conda create -p D:\dev\py_repo\open_manus python=3.12
# 激活这个环境
conda activate open_manus
- 支持 function calling 的大模型 API key
这里推荐使用 阿里云百炼平台,百炼开通后180天内送一定额度的 token,基本上是属于免费级别的
获得 API-KEY


- 获取模型
每个模型都有相应的说明,注意看每个模型的注意事项描述,如果说明了不支持 Function calling 的模型,是无法使用到 OpenManus 中的

比如这个图片中,deepseek-r1 模型就不支持 Function calling
亲测有效的是 qwen-plus 模型,qwq-32b 也是支持的,不过我没亲测
3、使用 PyCharm 打开源码,并配置虚拟环境
这一步主要是为了阅读源码和启动源码,如果不需要阅读源码的可以直接跳过本步骤
-
配置解释器
启动 PyCharm 打开源码,并配置刚刚设置的 open_manus conda 环境,我这里已经配置过了,没有配置过第一步显示的是 Add interpreter

-
选择虚拟环境

选择好以后,点击 OK ,等待环境的初始化和加载,大概也就 10 来分钟左右
4、配置 OpenManus 环境
- 如果是 PyCharm 启动,则直接手动复制
/config/config.example.toml将复制出来的文件名改为config.toml即可
# Global LLM configuration
[llm]
model = "qwen-plus"
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
api_key = "sk-.................................."
max_tokens = 4096
temperature = 0.0
model :一定要是支持 function calling 的模型
base_url:百炼云平台的接口地址,只要是百炼的模型,接口地址几乎是相同的,不用修改
api_key:这个就是之前注册的 api-key,直接复制接口
其他的都不用修改
- 如果是通过 CMD 启动的,则使用命令复制文件,然后将正确的内容填写进去即可
cp config/config.example.toml config/config.toml
5、依赖拉取
5.1、激活环境
PyCharm 打开 terminal 窗口,激活 conda 环境,注意这里一定要是在项目的根目录下才可以
conda activate open_manus
5.2、安装依赖
pip install -r .\requirements.txt
完整命令截图如下:

6、各种踩坑
6.1、不支持 function calling
不支持 tool call,选择支持 function calling 的模型
<400> InternalError.Algo.InvalidParameter: The tool call is not supported.
6.2、模型名字错误
检查模型的名字,是否拼写错误
'The model `xxxxxx` does not exist or you do not have access to it.'
6.3、google_search 无法调用
⚠️ Tool 'google_search' encountered a problem: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: /search?q=Google+homepage&num=12&hl=en&start=0&safe=active (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000020960CF1520>, 'Connection to www.google.com timed out. (connect timeout=5)'))
- 方式1:科学上网全局代理,或者切换稳定的谷歌代理站点
- 方式2:添加配置,有大佬提交了 pr,支持百度搜索
[llm]
model = "qwen-plus"
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
api_key = "sk-.................................."
max_tokens = 4096
temperature = 0.0
# 添加此项代码,走百度搜索
search_agent_config = "baidu"
6.4、循环打印日志 playwright install
2025-03-10 22:07:44.834 | INFO | app.agent.base:run:137 - Executing step 1/30
2025-03-10 22:07:48.030 | INFO | app.agent.toolcall:think:53 - ✨ Manus's thoughts:
2025-03-10 22:07:48.030 | INFO | app.agent.toolcall:think:54 - 🛠️ Manus selected 1 tools to use
2025-03-10 22:07:48.031 | INFO | app.agent.toolcall:think:58 - 🧰 Tools being prepared: ['browser_use']
2025-03-10 22:07:48.031 | INFO | app.agent.toolcall:execute_tool:140 - 🔧 Activating tool: 'browser_use'...
ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at C:\Users\admin\AppData\Local\ms-playwright\chromium-1148\chrome-win\chrome.exe
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
2025-03-10 22:07:48.464 | INFO | app.agent.toolcall:act:113 - 🎯 Tool 'browser_use' completed its mission! Result: Observed output of cmd `browser_use` executed:
Error: Browser action 'navigate' failed: BrowserType.launch: Executable doesn't exist at C:\Users\admin\AppData\Local\ms-playwright\chromium-1148\chrome-win\chrome.exe
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
2025-03-10 22:07:48.476 | INFO | app.agent.base:run:137 - Executing step 2/30
首先这个问题是缺少了浏览器,那么需要先下载浏览器组件
python -m playwright install chromium
pip install playwright
安装不上,那么就暴力安装
- 下载 chromium
下载地址:https://playwright-verizon.azureedge.net/builds/chromium/1148/chromium-win64.zi


3739

被折叠的 条评论
为什么被折叠?



