【发布时间】:2021-05-19 14:36:19
【问题描述】:
我正在尝试安装一个我必须处理的项目,其中一部分是安装geometry2,但使用python3 编译。我已经调试了一下,但构建过程几乎完成时失败。
这是运行catkin_make命令后终端输出的sn-p:
geometry2_ws catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
#### Running command: "make -j8 -l8" in "/home/vis2020/geometry2_ws/build"
[ 75%] Built target tf2_msgs_generate_messages
[ 80%] Built target tf2
make[2]: *** No rule to make target '/usr/lib/python3.6/config/libpython3.6.so', needed by '/home/vis2020/geometry2_ws/devel/lib/python3/dist-packages/tf2_py/_tf2.so'. Stop.
CMakeFiles/Makefile2:3158: recipe for target 'geometry2/tf2_py/CMakeFiles/tf2_py.dir/all' failed
make[1]: *** [geometry2/tf2_py/CMakeFiles/tf2_py.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 91%] Built target tf2_ros
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
我已经尝试了一遍又一遍,但我就是找不到解决方案。
【问题讨论】:
-
cd catkin/ && sudo python3 setup.py install.... 使用“python3 catkin”构建 tf2_ros :cd tf2_ros/ && sudo python3 setup.py install→ 没有错误。 .... 请注意,cmake 文件适用于 python2。 -
catkin_ws 和 tf2_ros 目录下没有 setup.py
-
catkin :
git clone https://github.com/ros/catkin.git→ catkin/setup.py ..... 或者使用 'pip3 install catkin' / 'sudo pip install catkin' 获取 python3 catkin ...... .....几何2:git clone https://github.com/ros/geometry2.git→geometry2/tf2_ros/setup.py -
我刚刚重新克隆了geometry2.git。那成功了。谢谢!
标签: python python-3.x linux cmake