
I'm walking through the tutorials and am on Introduction to msg and srv
I'm using Ubuntu 16.04 and Kinetic. My python is /usr/bin/python My pip is /usr/local/bin/pip
I'm running the command catkin_make install on Step 6 and I get the following 'em' not found error:
[ 69%] Generating Javascript code from beginner_tutorials/Num.msg [ 76%] Generating C++ code from beginner_tutorials/Num.msg [ 84%] Generating Javascript code from beginner_tutorials/AddTwoInts.srv Traceback (most recent call last): File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41, in <module> import genmsg.template_tools File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39, in <module> import em ImportError: No module named em beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_cpp.dir/build.make:63: recipe for target '/home/philglau/catkin_ws/devel/include/beginner_tutorials/Num.h' failed make[2]: *** [/home/philglau/catkin_ws/devel/include/beginner_tutorials/Num.h] Error 1 make[2]: *** Waiting for unfinished jobs.... Traceback (most recent call last): File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41, in <module> import genmsg.template_tools File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39, in <module> import em ImportError: No module named em beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_cpp.dir/build.make:70: recipe for target '/home/philglau/catkin_ws/devel/include/beginner_tutorials/AddTwoInts.h' failed So obviously, it thinks em is missing. So I ran both of the following to try to resolve it:
philglau@phil-glau-ubuntu-16:~$ sudo -H pip install empy Requirement already satisfied: empy in /usr/lib/python2.7/dist-packages And also tried:
philglau@phil-glau-ubuntu-16:~$ sudo apt-get install python-empy [sudo] password for philglau: Reading package lists... Done Building dependency tree Reading state information... Done python-empy is already the newest version (3.3.2-1build1). python-empy set to manually installed. The following packages were automatically installed and are no longer required: linux-headers-4.4.0-59 linux-headers-4.4.0-59-generic linux-image-4.4.0-59-generic linux-image-extra-4.4.0-59-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. And if I manually load python from the CLI, I can import em without it barking
philglau@phil-glau-ubuntu-16:~/catkin_ws$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import em >>> Likewise if I directly run template_tools.py from the CLI it doesn't bark either:
python /opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py I also 'reinstalled' ROS and it said 'nothing was updated.' I have not yet attempted to completely uninstall and then re-install, but hopefully that won't be necessary.
After all my attempts to fix this problem, I'm still getting the package not found error when running catkin_make as indicated in the tutorial. Any thoughts??
Thank you in advance for any help.
- Phil
Originally posted by philglau on ROS Answers with karma: 248 on 2017-03-18
Post score: 4