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

rk3588部署飞浆ocr使用命令行代码可以运行,但是使用python脚本调用出现问题 #2466

Open
sobrilliant1 opened this issue Jun 4, 2024 · 4 comments
Assignees

Comments

@sobrilliant1
Copy link

环境

  • 【FastDeploy版本】:fastdeploy-python-0.0.0
  • 【编译命令】官方教程编译
  • 【系统平台】: Linux version5.10,110-rockchip-rk3588(root@orangepi5)(aarch64-linux-gnu-gcc)
  • 【硬件】: rk 588
  • 【编译语言】: C++ / Python3.9

问题描述

大佬们好,我是小白,我用c++和python编译都成功了,用命令行的形式也能够成功运行,我想用pycharm运行infer.py脚本,我将模型图片等都直接在代码中修改了,然后报错RuntimeError: FastDeploy initalized failed! Error: libopencv_flann.so.3.4: cannot open shared object file: No such file or directory
这个问题我在用命令行调用的时候也出现过,我通过添加环境变量解决了这个问题,我也想用同样的方式解决脚本这个问题,通过百度到的方法,例如在代码中用os库添加环境变量,用vim改写~/.bashrc,都试过了,还是无法解决这个问题,请问大佬们还有什么解决方式吗

@sobrilliant1
Copy link
Author

https://gitcode.csdn.net/65e6eb7c1a836825ed788150.html?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTg0NTcyOCwiZXhwIjoxNzE4MTgxODc0LCJpYXQiOjE3MTc1NzcwNzQsInVzZXJuYW1lIjoic29fYnJpbGxpYW50In0.LF8WZPoihryrX-sMZuQYHNCcGRyt6gdlJ_Zxg43SIHk
我解决了,链接参考这个,写的很详细,我使用“将动态库绝对路径添加至/etc/ld.so.cache文件列表中”这个解决的,opencv编译的库在FasDeploy/python/build/lib.太多了不打了/fastdeploy/libs/third_libs/opencv/lib

@13307790006
Copy link

我卸载了opencv然后重新安装opencv3.4解决的,应该是已经有了别的版本的opencv,导致动态库版本不一致导致的

@13307790006
Copy link

建议重装opencv

@sobrilliant1
Copy link
Author

好的谢谢大哥,我虽然已经解决了这个问题,我有时间也按照你的方法试一试

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

3 participants