Robotics StackExchange | Archived questions

How to use python3 in ROS

I'm trying to use some python3 module in my node program, but ROSRUN can't use python3. So I tried to install python3 catkin command like this:

git clone git://github.com/ros-infrastructure/catkin_pkg.git 
cd catkin_pkg
sudo python3 setup.py install

git clone git://github.com/ros/catkin.git
cd catkin
sudo python3 setup.py install

I create a new package now in the available work space, catkin_make the ws, but got the error like this:

CMake Error at compass/

CMakeLists.txt:47 (add_message_files):
  `Unknown CMake command "add_message_files"`.

    -- Configuring incomplete, errors occurred!
    See also "/home/hqu/git/repos/ros/pi/build/CMakeFiles/CMakeOutput.log".
    See also "/home/hqu/git/repos/ros/pi/build/CMakeFiles/CMakeError.log".
    make: *** [cmake_check_build_system] Error 1
    Invoking "make cmake_check_build_sys
    tem" failed

Why? I'm sure the CMakeList.txt is right. The old package created before was well. New package always fail, sounds like the new apt-get installation screwed my ROS

Asked by Dragon Qu on 2015-02-07 23:57:04 UTC

Comments

Which version of ROS are you using? Which OS version?

Asked by joq on 2015-02-10 11:43:42 UTC

Answers

Potential duplicate of #q237613

Asked by 130s on 2018-02-15 13:34:26 UTC

Comments