Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 本地编译python库后,无法正常使用 #5857

Open
Baiyuetribe opened this issue Dec 27, 2024 · 0 comments
Open

[BUG] 本地编译python库后,无法正常使用 #5857

Baiyuetribe opened this issue Dec 27, 2024 · 0 comments

Comments

@Baiyuetribe
Copy link
Contributor

编译环境

设备:mac M4 pro,
其余工具及源码均为latest

复现步骤

0. 构建步骤

git clone https://github.com/Tencent/ncnn.git
cd  ncnn
git submodule update --init --recursive
# 开始构建
mkdir build
cd build
cmake -DNCNN_VULKAN=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_BENCHMARK=OFF ..
cmake --build . --target install --config Release -j 10
## 安装ncnn
cd ..
pip install .

上述过程正常构建且ncnn库安装成功。

1. 测试

import ncnn
ncnn.__version__

报错日志:

from .ncnn import *
ImportError: dlopen(/Users/baiyue/Library/Python/3.10/lib/python/site-packages/ncnn/ncnn.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_vkGetInstanceProcAddr'

其他

如果是从pypi库安装pip insall ncnn则正常;自己构建时,无论-DNCNN_VULKAN开启还是关闭,构建及安装均正常,但最终使用时报相同的错。

@Baiyuetribe Baiyuetribe changed the title [BUG] 本地编译pyhon库后,无法正常使用 [BUG] 本地编译python库后,无法正常使用 Dec 27, 2024
Baiyuetribe added a commit to Baiyuetribe/ncnn that referenced this issue Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant