[OpenManus]部署笔记
一、下载源码
git clone https://github.com/mannaandpoem/OpenManus.git
二、环境安装配置
- 下载 uv 安装脚本
在powershell下执行
Invoke-WebRequest -Uri https://astral.sh/uv/install.ps1 -OutFile install.ps1
2、执行安装脚本以安装 uv 工具
.\install.ps1
如果遇到错误:
.\install.ps1 : 无法加载文件 D:\openmanus\OpenManus\install.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https
:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ .\install.ps1
+ ~~~~~~~~~~~~~+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
解决办法:
用管理员运行
Set-ExecutionPolicy RemoteSigned
- 配置环境变量
路径为 powershell 中安装完 uv 输出的内容路径
C:\Users\Administrator\.local\bin
在path中增加上面的路径
4、验证uv
重新打开一个powershell窗口
uv –version
三、虚拟环境
- 创建激活虚拟环境
uv venv
激活虚拟环境
.venv\Scripts\activate
2、安装依赖
不使用国内镜像的命令
uv pip install -r requirements.txt
使用国内 清华大学镜像 (推荐,不然太慢了)
uv pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
四、修改manus配置文件
copy config\config.example.toml config\config.toml
在config.toml文件中进行修改
1、大模型配置
- 火山引擎
[llm]
model = "" # The LLM model to use 火山引擎的推理接入点ID
base_url = "https://ark.cn-beijing.volces.com/api/v3" # API endpoint URL
api_key = "" # Your API key
max_tokens = 8192 # Maximum number of tokens in the response
temperature = 0.0 # Controls randomness
- 硅基流动
[llm] # 硅基model = "Qwen/QwQ-32B" # 模型IDbase_url = "https://api.siliconflow.cn/v1" # max_tokens = 8192temperature = 1.0api_key = "" # 硅基流动的api_key
2、修改默认浏览器
打开[search]、engine、fallback_engines的注释
修改engine=“Baidu”,
修改为fallback_engines = [“bing”, “Baidu”]
# Optional configuration, Search settings.[search]
# Search engine for agent to use. Default is "Google", can be set to "Baidu" or "DuckDuckGo".
engine = "Baidu"
# Fallback engine order. Default is ["DuckDuckGo", "Baidu"] - will try in this order after primary engine fails.
fallback_engines = ["bing", "Baidu"]
# Seconds to wait before retrying all engines again when they all fail due to rate limits. Default is 60.
#retry_delay = 60
# Maximum number of times to retry all engines when all fail. Default is 3.
#max_retries = 3
五、UV更改源
在项目路径下新建uv.toml,在文件中添加下面的内容
[[index]]
url = “https://pypi.tuna.tsinghua.edu.cn/simple”
default = true
六、快速启动openManus
激活虚拟环境
.venv\Scripts\activate
执行命令:python main.py
(1)输入文本对话提示词示例:
What opportunities and challenges will the Chinese large model industry face in 2025?
(2)图片提示词示例
an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea
(3)视频生成提示词示例
A woman with light skin, wearing a blue jacket and a black hat with a veil,She first looks down and to her right, then raises her head back up as she speaks
5 openManus作为mcp-server
以sse的形式启动manus
python run_mcp_server.py
七、openManus网页版
源码:
Git clone https://github.com/YunQiAI/OpenManusWeb.git
启动
python web_run.py --port 8001
验证
在浏览器中输入:http://localhost:8001/
在对话框中输入提示词
1+1=?
页面展示结果