Ask Your Question

cannot import interpreter

asked 2019-02-22 10:07:49 -0600

LCD gravatar image

updated 2019-02-22 10:11:20 -0600

gvdhoorn gravatar image

When building ROS2 on Windows using this command on Visual studio command prompt

colcon build --merge install

It shows the error:

Exception loading extension 'colcon_core.environment_variable.powershell_command': cannot import name 'Interpreter' from 'em' (c:\python37\lib\site-packages\em\
Traceback (most recent call last):
  File "c:\python37\lib\site-packages\colcon_core\", line 98, in load_entry_points
    extension_type = load_entry_point(entry_point)
  File "c:\python37\lib\site-packages\colcon_core\", line 140, in load_entry_point
    return entry_point.load()
  File "c:\python37\lib\site-packages\pkg_resources\", line 2411, in load
    return self.resolve()
  File "c:\python37\lib\site-packages\pkg_resources\", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python37\lib\site-packages\colcon_powershell\shell\", line 17, in <module>
    from import expand_template
  File "c:\python37\lib\site-packages\colcon_core\shell\template\", line 8, in <module>
    from em import Interpreter
ImportError: cannot import name 'Interpreter' from 'em' (c:\python37\lib\site-packages\em\

Does anyone know how to resolve this problem?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-22 10:30:34 -0600

Dirk Thomas gravatar image

It looks like you have the wrong dependency installed. You need (not ).

edit flag offensive delete link more


I did install EmPy using :

pip install -U catkin_pkg EmPy git+ pyparsing pyyaml

Should I uninstall em in this case?


LCD gravatar image LCD  ( 2019-02-22 10:57:16 -0600 )edit

That might be necessary if both packages use the same module name.

Dirk Thomas gravatar image Dirk Thomas  ( 2019-02-22 10:58:48 -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


Asked: 2019-02-22 10:07:49 -0600

Seen: 626 times

Last updated: Feb 22 '19