Ask Your Question
0

ImportError: No module named 'em', Error

asked 2017-03-23 22:59:24 -0600

tomcattiger gravatar image

Hi,

I create a test package as tutorial using

catkin_create_pkg beginner_tutorials std_msgs rospy roscpp.

When I add a custom message, it comes error

[100%] Built target beginner_tutorials_generate_messages_lisp

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:62: recipe for target '/home/arnoldx201/catkin_ws/devel/include/beginner_tutorials/Complex.h' failed

make[2]: * [/home/arnoldx201/catkin_ws/devel/include/beginner_tutorials/Complex.h] Error 1 CMakeFiles/Makefile2:1136: recipe for target 'beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_cpp.dir/all' failed

make[1]: * [beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_cpp.dir/all] Error 2

Makefile:138: recipe for target 'all' failed

make: * [all] Error 2

Invoking "make -j4 -l4" failed

When I use directly python --> import cm, there is no problem.

Has anyone met the same problem before? Thanks

edit retag flag offensive close merge delete

Comments

Hattest du eine Lösung für dein Problem gefunden?

Ich stehe momentan vor dem exakt gleichen Problem und komme nicht weiter :(

fettespferd gravatar image fettespferd  ( 2019-01-21 06:49:08 -0600 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2017-03-24 00:14:07 -0600

ahendrix gravatar image

Yes, other users have seen this before.

A quick search on this site for the title of your question turns us: http://answers.ros.org/question/25733... , http://answers.ros.org/question/23928... and http://answers.ros.org/question/22828... , all of which describe different causes for this error and possible solutions.

edit flag offensive delete link more

Comments

I had this same problem. The first link had the solution that solved it for me. I needed to install the python empy library. "pip install empy" and then "catkin_make" worked. Thanks!

mkelly66 gravatar image mkelly66  ( 2019-07-22 22:42:02 -0600 )edit
3

answered 2019-12-11 00:22:53 -0600

bobo_truth gravatar image

I have fixed this by running sudo apt-get install python3-empy

edit flag offensive delete link more

Comments

worked for me too :)

Lidor Shimoni gravatar image Lidor Shimoni  ( 2020-01-27 06:32:14 -0600 )edit

Worked for me too. THanks BUddy

Deepak_Kr_Yadav gravatar image Deepak_Kr_Yadav  ( 2020-02-21 08:24:47 -0600 )edit

Thank You. After many tried, the 'sudo apt-get install python3-empy' works.

Morna_Bot gravatar image Morna_Bot  ( 2020-05-18 03:38:47 -0600 )edit

Thank you! This solved the problem.

jlpm gravatar image jlpm  ( 2020-06-11 16:28:42 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-23 22:59:24 -0600

Seen: 17,135 times

Last updated: Mar 24 '17