PaddlePaddle / PaddlePaddle/FastDeploy
Jetson部署库编译安装后运行错误
@rainyfly is already working on this.
Since Apr 7, 2024.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 756
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 4
Description
-
【系统平台】: Ubuntu 18.04
-
【硬件】: Jetson NX,jetpack4.6 CUDA 10.2 CUDNN 8.2
-
【编译语言】: C++ / Python(3.8)
按照https://github.com/PaddlePaddle/FastDeploy/blob/develop/docs/cn/build_and_install/jetson.md在Jetson NX上以源码方式编译安装fastDeploy,安装成功,但是在python中运行出错。 -
【编译命令】
-
先编译C++
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -DBUILD_ON_JETSON=ON
-DENABLE_VISION=ON
-DENABLE_PADDLE_BACKEND=OFF \ # 可选项,如若不需要Paddle Inference后端,可关闭
-DPADDLEINFERENCE_DIRECTORY=/Download/paddle_inference_jetson
-DCMAKE_INSTALL_PREFIX=${PWD}/installed_fastdeploy
make -j8
make install -
Python编译安装:
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/python
export BUILD_ON_JETSON=ON
export ENABLE_VISION=ON
python setup.py build
python setup.py bdist_wheel
wheel包安装成功。
测试代码:
import cv2
import fastdeploy.vision as vision
model = vision.detection.PPYOLOE("ppyoloe_crn_l_300e_coco/model.pdmodel",
"ppyoloe_crn_l_300e_coco/model.pdiparams",
"ppyoloe_crn_l_300e_coco/infer_cfg.yml")
im = cv2.imread("ppocr_img/imgs/14.jpg")
result = model.predict(im)
print(result)
错误提示:
Traceback (most recent call last):
File "/home/nvidia/miniconda3/envs/camera/lib/python3.8/site-packages/fastdeploy/c_lib_wrap.py", line 164, in
from .libs.fastdeploy_main import *
ModuleNotFoundError: No module named 'fastdeploy.libs.fastdeploy_main'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nvidia/PycharmProjects/untitled/fastdeploy_demo.py", line 2, in
import fastdeploy.vision as vision
File "/home/nvidia/miniconda3/envs/camera/lib/python3.8/site-packages/fastdeploy/init.py", line 122, in
from .c_lib_wrap import (
File "/home/nvidia/miniconda3/envs/camera/lib/python3.8/site-packages/fastdeploy/c_lib_wrap.py", line 166, in
raise RuntimeError(f"FastDeploy initalized failed! Error: {e}")
RuntimeError: FastDeploy initalized failed! Error: No module named 'fastdeploy.libs.fastdeploy_main'
Process finished with exit code 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.