Skip to content

[Bug]: python 3.11版本:Vikingbot 在arm64 (Apple Silicon)的macos上,无法正常运行, #387

@feng-crazy

Description

@feng-crazy

Bug Description

python 3.11版本:Vikingbot 在arm64 (Apple Silicon)的macos上,无法正常运行,

Steps to Reproduce

按照如下文档操作,在macos上
git clone https://github.com/volcengine/OpenViking
cd OpenViking/bot

创建 Python 3.11 或更高版本 虚拟环境

uv venv --python 3.11

激活环境

source .venv/bin/activate # macOS/Linux

.venv\Scripts\activate # Windows

安装依赖

uv pip install -e .

运行vikingbot gateway
报错如下:
import openviking.storage.vectordb.engine as engine
ImportError: dlopen(/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so, 0x0002): tried: '/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (no such file), '/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))

Expected Behavior

vikingbot gateway正常运行

Actual Behavior

报错终止 import openviking.storage.vectordb.engine as engine
ImportError: dlopen(/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so, 0x0002): tried: '/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (no such file), '/Users/hedengfeng/Documents/GitHub/OpenViking/bot/.venv/lib/python3.11/site-packages/openviking/storage/vectordb/engine.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))

Minimal Reproducible Example

Error Logs

OpenViking Version

0.2.1

Python Version

3.11

Operating System

macOS

Model Backend

None

Additional Context

3.12版本可以运行,我怀疑是pypi上的3.11版本的macos包错误

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions