PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
2.93k stars 456 forks source link

python编译安装fastdeploy,出现错误 #2505

Open wzd129 opened 1 month ago

wzd129 commented 1 month ago

Environment

FastDeploy version: e.g 0.8.0 or the latest code in develop branch OS Platform: ARM64 Hardware: RK3588 Program Language: e.g. Python 3.8

Problem description

当运行python3 setup.py build 出现报错: gmake[2]: [CMakeFiles/fastdeploy_main.dir/build.make:104:CMakeFiles/fastdeploy_main.dir/fastdeploy/pybind/fastdeploy_model.cc.o] 错误 1 In file included from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/../attr.h:13, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/class.h:12, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/pybind11.h:13, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/numpy.h:12, from /home/linaro/FastDeploy/./fastdeploy/pybind/main.h:17, from /home/linaro/FastDeploy/fastdeploy/pybind/fd_tensor.cc:19: /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/../detail/common.h:211:10: fatal error: Python.h: 没有那个文件或目录 211 | #include <Python.h> | ^~~~~~ compilation terminated. gmake[2]: [CMakeFiles/fastdeploy_main.dir/build.make:118:CMakeFiles/fastdeploy_main.dir/fastdeploy/pybind/fd_tensor.cc.o] 错误 1 gmake[1]: [CMakeFiles/Makefile2:259:CMakeFiles/fastdeploy_main.dir/all] 错误 2 gmake: [Makefile:156:all] 错误 2 Traceback (most recent call last): File "/home/linaro/FastDeploy/python/setup.py", line 445, in <module> setuptools.setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(attrs) File "/usr/lib/python3.10/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.10/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) gmake[2]: ** [CMakeFiles/fastdeploy_main.dir/build.make:104:CMakeFiles/fastdeploy_main.dir/fastdeploy/pybind/fastdeploy_model.cc.o] 错误 1 In file included from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/../attr.h:13, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/class.h:12, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/pybind11.h:13, from /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/numpy.h:12, from /home/linaro/FastDeploy/./fastdeploy/pybind/main.h:17, from /home/linaro/FastDeploy/fastdeploy/pybind/fd_tensor.cc:19: /home/linaro/FastDeploy/third_party/pybind11/include/pybind11/detail/../detail/common.h:211:10: fatal error: Python.h: 没有那个文件或目录 211 | #include <Python.h> | ^~~~~~ compilation terminated. gmake[2]: [CMakeFiles/fastdeploy_main.dir/build.make:118:CMakeFiles/fastdeploy_main.dir/fastdeploy/pybind/fd_tensor.cc.o] 错误 1 gmake[1]: [CMakeFiles/Makefile2:259:CMakeFiles/fastdeploy_main.dir/all] 错误 2 gmake: [Makefile:156:all] 错误 2 Traceback (most recent call last): File "/home/linaro/FastDeploy/python/setup.py", line 445, in <module> setuptools.setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.10/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.10/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command)


wzd129 commented 1 month ago

python环境是3.10

Jiang-Jia-Jun commented 1 month ago

可以安装个新版本cmake试下