我正在尝试在Ubuntu上安装ROS,但一直运行以下错误。有谁能建议一下如何克服这个问题吗?
==> Building with env: '/home/USER/ros_catkin_ws/install_isolated/env.sh'
==> cmake /home/USER/ros_catkin_ws/src/orocos_kinematics_dynamics/python_orocos_kdl -DCMAKE_INSTALL_PREFIX=/home/USER/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/USER/ros_catkin_ws/build_isolated/python_orocos_kdl/install'
Traceback (most recent call last):
File "/home/USER/ros_catkin_ws/src/orocos_kinematics_dynamics/python_orocos_kdl/cmake/FindSIP.py", line 8, in <module>
import sipconfig
ImportError: No module named sipconfig
CMake Error at cmake/FindSIP.cmake:63 (MESSAGE):
Could not find SIP
Call Stack (most recent call first):
CMakeLists.txt:14 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/USER/ros_catkin_ws/build_isolated/python_orocos_kdl/install/CMakeFiles/CMakeOutput.log".
<== Failed to process package 'python_orocos_kdl':
Command '['/home/USER/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/home/USER/ros_catkin_ws/src/orocos_kinematics_dynamics/python_orocos_kdl', '-DCMAKE_INSTALL_PREFIX=/home/USER/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/USER/ros_catkin_ws/build_isolated/python_orocos_kdl && /home/USER/ros_catkin_ws/install_isolated/env.sh cmake /home/USER/ros_catkin_ws/src/orocos_kinematics_dynamics/python_orocos_kdl -DCMAKE_INSTALL_PREFIX=/home/USER/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'```发布于 2020-03-06 16:54:33
可能发生的情况是,安装了sipconfig,但安装的是不同版本的Python2.7(即不是Python2.7)。您可以通过在Python2.7 site-packages目录中创建指向sipconfig.py的链接来修复此问题,如下所示:
ln -s /usr/local/Cellar/sip/4.19.21/lib/python3.7/site-packages/sipconfig.py /usr/local/lib/python2.7/site-packages/sipconfig.py注意:这在macOS上是成功的,所以Ubuntu上的文件路径可能不同--特别是第一个路径(源文件)。
要检查这是否确实是问题所在,请执行以下操作:
尝试在Python2.7和Python3shell中执行以下import语句。如果它在2.7和3中都失败了,那么不幸的是这不是你的问题。
import sipconfighttps://stackoverflow.com/questions/57399345
复制相似问题