ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Problem in using Pocketsphinx in RaspberryPi 3B

asked 2018-09-25 02:31:56 -0500

Shriya gravatar image

updated 2018-09-25 09:08:36 -0500

gvdhoorn gravatar image

We are using Ubuntu Core in raspberry pi. There is a problem while launching the Pocketsphinx package, even after creating the virtual environmet, the problem still exists..

$ roslaunch pocketsphinx pocketsphinx.launch 
... logging to /home/rshriya/.ros/log/6d92af0c-c094-11e8-bd13-b827eb8dfe7b/roslaunch-localhost.localdomain-3064.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost.localdomain:35716/


 * /rosdistro: kinetic
 * /rosversion: 1.12.14

    pocketsphinx_recognizer (pocketsphinx/

auto-starting new master
process[master]: started with pid [3074]

setting /run_id to 6d92af0c-c094-11e8-bd13-b827eb8dfe7b
process[rosout-1]: started with pid [3087]
started core service [/rosout]
process[pocketsphinx_recognizer-2]: started with pid [3090]
Traceback (most recent call last):
  File "/home/rshriya/jms_ws/src/pocketsphinx/scripts/", line 4, in <module>
    import rospy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 47, in <module>
    from std_msgs.msg import Header
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/std_msgs/msg/", line 1, in <module>
    from ._Bool import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/std_msgs/msg/", line 5, in <module>
    import genpy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/", line 44, in <module>
    import yaml
ImportError: No module named yaml
[pocketsphinx_recognizer-2] process has died [pid 3090, exit code 1, cmd /home/rshriya/jms_ws/src/pocketsphinx/scripts/ _dict:=/home/rshriya/jms_ws/src/pocketsphinx/vocab/voice_cmd.dic _kws:=/home/rshriya/jms_ws/src/pocketsphinx/vocab/voice_cmd.kwlist _stream:=true _wavpath:=none __name:=pocketsphinx_recognizer __log:=/home/rshriya/.ros/log/6d92af0c-c094-11e8-bd13-b827eb8dfe7b/pocketsphinx_recognizer-2.log].
log file: /home/rshriya/.ros/log/6d92af0c-c094-11e8-bd13-b827eb8dfe7b/pocketsphinx_recognizer-2*.log
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-25 09:09:22 -0500

gvdhoorn gravatar image
ImportError: No module named yaml

From this I would say you didn't install all dependencies.

The yaml module seems to be missing.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-09-25 02:31:56 -0500

Seen: 170 times

Last updated: Sep 25 '18